linux:miwifi-shadowsocks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
linux:miwifi-shadowsocks [2018/09/03 23:54] – percy | linux:miwifi-shadowsocks [2019/03/09 01:32] – 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> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
</ | </ | ||
Line 77: | Line 124: | ||
===== ssh keys ===== | ===== ssh keys ===== | ||
- | OpenWrt is not using ~/.ssh for the keys, and it use / | + | OpenWrt is not using ~/.ssh for the keys, and it use / |
+ | - https:// | ||
+ | - https:// | ||
scp yourpubkey root@192.168.31.1:/ | scp yourpubkey root@192.168.31.1:/ | ||
Line 95: | Line 144: | ||
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 101: | Line 180: | ||
- http:// | - http:// | ||
- https:// | - https:// | ||
+ | - http:// | ||
/var/www/dokuwiki/wiki/data/pages/linux/miwifi-shadowsocks.txt · Last modified: 2019/03/09 01:35 by percy