Skip to content

Commit

Permalink
add socks5 tunnel
Browse files Browse the repository at this point in the history
  • Loading branch information
anasfanani committed May 1, 2024
1 parent c446160 commit 2043cc6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copyright (c) 2022 hev for hev-socks5-tunnel

https://github.com/heiher/hev-socks5-tunnel/releases/tag/2.6.8

BSD 3-Clause License

Copyright (c) 2020 Tailscale Inc & AUTHORS.
Expand Down
10 changes: 7 additions & 3 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ unzip -qqjo "$ZIPFILE" 'tailscale/bin/*' -d "$CUSTOM_BIN_DIR"
unzip -qqjo "$ZIPFILE" 'tailscale/scripts/*' -d "$CUSTOM_SCRIPTS_DIR"
unzip -qqjo "$ZIPFILE" 'tailscale/settings.ini' -d "$CUSTOM_DIR"

ui_print "- Extracting binaries"
ui_print "- Extracting tailscale & tailscaled binaries"
unzip -qqjo "$ZIPFILE" "files/tailscaled-$F_ARCH" -d "$TMPDIR"
unzip -qqjo "$ZIPFILE" "files/tailscale-$F_ARCH" -d "$TMPDIR"
mv -f "$TMPDIR/tailscaled-$F_ARCH" "$CUSTOM_BIN_DIR/tailscaled"
mv -f "$TMPDIR/tailscale-$F_ARCH" "$CUSTOM_BIN_DIR/tailscale"

ui_print "- Extracting hev-socks5-tunnel binaries"
unzip -qqjo "$ZIPFILE" "files/hev-socks5-tunnel-linux-$F_ARCH" -d "$TMPDIR"
mv -f "$TMPDIR/hev-socks5-tunnel-linux-$F_ARCH" "$CUSTOM_BIN_DIR/socks5-tunnel"

ui_print "- Setting permissions"
set_perm_recursive $CUSTOM_BIN_DIR 0 0 0755 0755
set_perm_recursive $CUSTOM_SCRIPTS_DIR 0 0 0755 0755
Expand All @@ -70,14 +74,14 @@ if [ ! -f "$SERVICE_DIR/tailscaled_service.sh" ]; then
ui_print "- Because the Developer Guides mentioned :"
ui_print " Modules should NOT add general scripts during installation."
ui_print "- I offer this option to you."
ui_print "- You have 30 seconds to make a selection. Default is [Yes]."
ui_print "- You have 10 seconds to make a selection. Default is [Yes]."
ui_print "- [ Vol UP(+): Yes ]"
ui_print "- [ Vol DOWN(-): No ]"
start_time=`date +%s`
while true; do
current_time=`date +%s`
time_diff=`expr $current_time - $start_time`
if [ $time_diff -ge 30 ]; then
if [ $time_diff -ge 10 ]; then
ui_print "- Time's up! Proceeding with default option [Yes]."
ui_print "- Move Module Scripts to General Scripts."
mv -f "$MODPATH/service.sh" "$SERVICE_DIR/tailscaled_service.sh"
Expand Down

0 comments on commit 2043cc6

Please sign in to comment.