linux:miwifi-shadowsocks
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:miwifi-shadowsocks [2018/09/04 00:04] – percy | linux:miwifi-shadowsocks [2019/03/09 01:35] (current) – percy | ||
|---|---|---|---|
| Line 51: | Line 51: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| <code BASH> | <code BASH> | ||
| / | / | ||
| / | / | ||
| + | </ | ||
| + | |||
| + | Everytime after the router restart, it will delete the script, so I put the script to / | ||
| + | chmod +x / | ||
| + | ln -s / | ||
| + | / | ||
| + | |||
| + | |||
| + | ==== To support kcptun with shadowsocks ==== | ||
| + | |||
| + | <code BASH> | ||
| + | CONFIG_KCPTUN=/ | ||
| + | # | ||
| + | CONFIG=$CONFIG_KCPTUN | ||
| + | DNS=8.8.8.8: | ||
| + | TUNNEL_PORT=5353 | ||
| + | |||
| + | start() { | ||
| + | # Client Mode | ||
| + | # | ||
| + | # Proxy Mode | ||
| + | | ||
| + | # Tunnel | ||
| + | | ||
| + | } | ||
| + | stop() { | ||
| + | # Client Mode | ||
| + | # | ||
| + | # Proxy Mode | ||
| + | | ||
| + | # Tunnel | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | And the shadowsocks-kcptun.json | ||
| + | <code Bash> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | And it will depends on the kcptun `cat / | ||
| + | <code Bash> | ||
| + | |||
| + | #!/bin/sh | ||
| + | |||
| + | cd / | ||
| + | echo ./ | ||
| + | ./ | ||
| </ | </ | ||
| Line 97: | Line 154: | ||
| Then you can use the follow ssh command to login automatically | Then you can use the follow ssh command to login automatically | ||
| ssh root@192.168.31.1 | ssh root@192.168.31.1 | ||
| - | | + | |
| + | If you want to ssh to the other server in the OpenWRT, you can also add the config file, and use -F to set the ssh config file | ||
| + | ssh -F config username@yourserver | ||
| + | ===== Remote ssh forward ===== | ||
| + | |||
| + | sh / | ||
| + | ssh root@ef.pjq.me -p 32222 | ||
| + | <code Bash> | ||
| + | cat / | ||
| + | # | ||
| + | |||
| + | if [ $# = 2 ];then | ||
| + | localport=$1 | ||
| + | remoteport=$2 | ||
| + | echo ssh -gNfR ef.pjq.me: | ||
| + | ssh -F / | ||
| + | #echo autossh -f -M 2" | ||
| + | #autossh -f -M 2" | ||
| + | echo DONE, Now you can visit it via | ||
| + | echo http:// | ||
| + | else | ||
| + | cat << | ||
| + | Usage: | ||
| + | ./$0 localport remoteport | ||
| + | For example, forward the localhost port 80 to the remote server 8080 | ||
| + | ssh -gNfR ef.pjq.me: | ||
| + | Then, you can visit it via: http:// | ||
| + | EOF | ||
| + | |||
| + | fi | ||
| + | </ | ||
| ===== Reference ===== | ===== Reference ===== | ||
| Line 103: | Line 190: | ||
| - http:// | - http:// | ||
| - https:// | - https:// | ||
| + | - http:// | ||
/var/www/dokuwiki/wiki/data/attic/linux/miwifi-shadowsocks.1535990645.txt.gz · Last modified: 2018/09/04 00:04 by percy
