From 2043cc62a996f38e8d425e64ad87933d055b0e93 Mon Sep 17 00:00:00 2001 From: Anas <135501348+anasfanani@users.noreply.github.com> Date: Wed, 1 May 2024 21:02:24 +0000 Subject: [PATCH] add socks5 tunnel --- LICENSE | 4 ++++ customize.sh | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index bed814d..930aa76 100644 --- a/LICENSE +++ b/LICENSE @@ -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. diff --git a/customize.sh b/customize.sh index 2d1233b..4aca030 100644 --- a/customize.sh +++ b/customize.sh @@ -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 @@ -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"