-
Notifications
You must be signed in to change notification settings - Fork 171
Route Traffic Through Domestic Server With KCPTUN
Hirbod Behnam edited this page Jul 1, 2019
·
4 revisions
THIS TUTORIAL ONLY AND ONLY BYPASSES OUTGOING DPI AND WILL NOT MASK YOUR DOMESTIC SERVER IP
Basically everything is just like routing with shadowsocks. But it uses kcptun to route your traffic.
At first edit /etc/sysctl.conf
and add these lines:
net.core.rmem_max=26214400
net.core.rmem_default=26214400
net.core.wmem_max=26214400
net.core.wmem_default=26214400
net.core.netdev_max_backlog=2048
Then edit ~/.bashrc
and at the very last of it add this line:
ulimit -n 65535
Restart the server after these changes.
- Download the related kcptun executable from here.
- Extract it using
tar xf kcptun-linux-xxx.tar.gz
- Then enter the following command: (You need to run this with
screen
ortmux
)
./server_linux_amd64 -t "127.0.0.1:1234" -l ":4321" -mode fast3 -nocomp -sockbuf 16777217 -dscp 46
-
1234
here is the port of your proxy. -
4321
this is the port the server listens on. Choose this one.
- If your OS is Ubuntu run
ufw allow 4321/udp
; If your system is Centos runfirewall-cmd --add-port=4321/udp && firewall-cmd --permanent --add-port=4321/udp
(Change4321
if needed)
- Download the related kcptun executable from here.
- Extract it using
tar xf kcptun-linux-xxx.tar.gz
- Then enter the following command: (You need to run this with
screen
ortmux
)
./client_linux_amd64 -r "1.1.1.1:4321" -l ":1234" -mode fast3 -nocomp -autoexpire 900 -sockbuf 16777217 -dscp 46
-
1234
here is the port of your proxy. (You can change this) -
4321
is the port you have chosen on foreign server. -
1.1.1.1
is your foreign server ip address.
- If your OS is Ubuntu run
ufw allow 1234/tcp
; If your system is Centos runfirewall-cmd --add-port=1234/tcp && firewall-cmd --permanent --add-port=1234/tcp
(Change1234
if needed)