Skip to content

Instantly share code, notes, and snippets.

@sae13
Last active February 12, 2023 16:31
Show Gist options
  • Save sae13/be44397677ca1a7c3a825c491749cfde to your computer and use it in GitHub Desktop.
Save sae13/be44397677ca1a7c3a825c491749cfde to your computer and use it in GitHub Desktop.

Shadowsocks

https://github.com/shadowsocks/shadowsocks-rust/releases/

Xray

https://github.com/teddysun/xray-plugin/releases/

shadowsocks command

/home/saeb/ssr/ss/ssservice server -s 127.0.0.1:11080 -k pa33word -m chacha20-ietf-poly1305 --plugin /home/saeb/ssr/xtls/xray-plugin_linux_amd64 --plugin-opts server -v

nginx config

server {

	server_name srv1.myserverforkhakbarsari.ir;

	location / {
	proxy_pass http://127.0.0.1:11080;
    proxy_redirect              off;
    proxy_http_version          1.1;
    proxy_set_header Upgrade    $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host       $http_host;
	}


}



client app and plugin

sagernet

https://github.com/SagerNet/SagerNet/releases

xray plugin

https://github.com/teddysun/xray-plugin-android/releases/

@sae13
Copy link
Author

sae13 commented Feb 12, 2023


#!/bin/bash
export version_ss="$(curl -L -s -o /dev/null -w %{url_effective} https://github.com/shadowsocks/shadowsocks-rust/releases/latest|rev|cut -d/ -f1|rev)"
export version_xray="$(curl -L -s -o /dev/null -w %{url_effective} https://github.com/teddysun/xray-plugin/releases/latest|rev|cut -d/ -f1|rev)"
export url_xray="https://github.com/teddysun/xray-plugin/releases/download/$version_xray/xray-plugin-linux-amd64-$version_xray.tar.gz"
export url_ss="https://github.com/shadowsocks/shadowsocks-rust/releases/download/$version_ss/shadowsocks-$version_ss.x86_64-unknown-linux-gnu.tar.xz"
export sspath=$HOME/.local/bin
mkdir -p $sspath >/dev/null 2>&1
mkdir /tmp/ss  >/dev/null 2>&1
cd $sspath
echo "downloading xray plugin: $url_xray"
curl -LOs  $url_xray
echo "downladong ss: $url_ss"
curl -LOs  $url_ss
tar -xf shadowsocks-$version_ss.x86_64-unknown-linux-gnu.tar.xz
tar -xf xray-plugin-linux-amd64-$version_xray.tar.gz
mv  shadowsocks-$version_ss.x86_64-unknown-linux-gnu.tar.xz /tmp/ss
mv  xray-plugin-linux-amd64-$version_xray.tar.gz /tmp/ss
chmod +x $sspath/ssservice 
export password_="$(head -c 8 /dev/random|xxd -ps)"
echo "$sspath/ssservice server -s 127.0.0.1:11080 -k $password_ -m aes-256-gcm --plugin $sspath/xray-plugin_linux_amd64 --plugin-opts server -v"



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment