“Mtp on kcptun”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
 
(未显示同一用户的8个中间版本)
第1行: 第1行:
 
[[category:ops]] [[category:mtp]]  
 
[[category:ops]] [[category:mtp]]  
 +
Kcptun给***mtp加速
 
=国外节点 安装  mtp and  kcptun server =
 
=国外节点 安装  mtp and  kcptun server =
  
第33行: 第34行:
 
  wget  -c    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-386-20201126.tar.gz
 
  wget  -c    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-386-20201126.tar.gz
  
./server_linux_386 -l :80 -t 127.0.0.1:15854 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2  -sockbuf 16777217  2>&1 &</pre>
+
要放在 tmux 里面 不然会断的 or nohup
 +
./server_linux_386 -l :80 -t 127.0.0.1:15854 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2  -sockbuf 16777217  2>&1 &
 +
 
 +
启动脚本
 +
 
 +
cat      /etc/supervisor/conf.d/mtp.conf
 +
[program:MGToastServer] ;
 +
command=/root/kcptun/server_linux_amd64 -l :8083 -t 127.0.0.1:27784 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 & ;
 +
directory=/root/kcptun ;
 +
autorestart=true ;
 +
stderr_logfile=/var/log/MGToastServer.err.log ;
 +
stdout_logfile=/var/log/MGToastServer.out.log ;
 +
environment=ASPNETCORE_ENVIRONMENT=Production ;
 +
user=root ;
 +
stopsignal=INT
 +
 
 +
 
 +
easy_install supervisor
 +
  supervisord -c /etc/supervisor/supervisord.conf
 +
  839  ps -ef|grep supervisor
 +
 
 +
supervisorctl reload
 +
 
 +
 
 +
 
 +
</pre>
  
 
= 国内节点 安装 kcptun client =
 
= 国内节点 安装 kcptun client =
第53行: 第79行:
  
 
领导搞了个 32 bit机子   
 
领导搞了个 32 bit机子   
 +
</pre>
 +
 +
=不同端口的一个完整例子=
 +
<pre>
 +
 +
abroad
 +
 +
78.141.217.7
 +
 +
---------- Telegram MTProto 配置信息 -------------
 +
 +
主机 (Hostname) = 78.141.217.7
 +
 +
端口 (Port) = 27784
 +
 +
密钥 (Secret) = ddd65ebdc80f5a056dc9ea8354cd53b8
 +
 +
Telegram 代理配置链接 = https://t.me/proxy?server=78.141.217.7&port=27784&secret=ddd65ebdc80f5a056dc9ea8354cd53b8
 +
 +
 +
要放在 tmux 里面 不然会断的 or nohup
 +
./server_linux_amd64 -l :8083 -t 127.0.0.1:27784 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &
 +
 +
 +
vultr ~]# ps  -ef  | grep  server
 +
root      1145  1144  1 Jul21 ?        1-15:36:20 /root/kcptun/server_linux_amd64 -l :8083 -t 127.0.0.1:27784 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &
 +
 +
可见 kcptun server  mtp 都 在
 +
 +
 +
inland
 +
 +
ip 103.39.214.6
 +
 +
  /root/kcptun/client_linux_amd64 -l :9004 -r 78.141.217.7:8083 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 -conn 4  -sockbuf 16777217  2>&1 &
 +
 +
 +
 +
最后的 mtp url
 +
 +
 +
https://t.me/proxy?server=103.39.214.6&port=9004&secret=ddd65ebdc80f5a056dc9ea8354cd53b8
 +
 
</pre>
 
</pre>
  
 
=see also=
 
=see also=
 +
 +
 +
==kcptun 相关==
 +
 
https://github.com/xtaci/kcptun
 
https://github.com/xtaci/kcptun
 +
 +
[https://blog.luna.xin/article/20.html shadowsocks利用kcptun转发加速的优势与不足]
 +
 +
[https://blog.phpgao.com/kcptun.html 使用KCPTUN加速你的VPS]
 +
 +
[https://www.veidc.com/6941.html 超级加速工具KCPTUN一键安装脚本 附100倍加速效果图]
 +
 +
https://blog.csdn.net/weixin_33908217/article/details/93907651

2020年12月13日 (日) 06:35的最新版本

Kcptun给***mtp加速

国外节点 安装 mtp and kcptun server

安装 mtp

bash <(wget -qO- https://git.io/mtg.sh)
 mtg 

	得到 国外节点的mtp info  

https://t.me/proxy?port=15854&secret=ee579b292c6e87db4d0e1ac6dcb598b1d062696e672e636f6&server=109.182.27.193

kcpturn server

os init 

ulimit -n 65535, or write it in ~/.bashrc.

Suggested sysctl.conf parameters for better handling of UDP packets:

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 


app install 
 wget    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-amd64-20201126.tar.gz


 wget  -c    https://github.com/xtaci/kcptun/releases/download/v20201126/kcptun-linux-386-20201126.tar.gz

要放在 tmux 里面 不然会断的 or nohup 
./server_linux_386 -l :80 -t 127.0.0.1:15854 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2  -sockbuf 16777217   2>&1 &

启动脚本 

 cat      /etc/supervisor/conf.d/mtp.conf
[program:MGToastServer] ;
command=/root/kcptun/server_linux_amd64 -l :8083 -t 127.0.0.1:27784 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 & ;
directory=/root/kcptun ;
autorestart=true ;
stderr_logfile=/var/log/MGToastServer.err.log ;
stdout_logfile=/var/log/MGToastServer.out.log ;
environment=ASPNETCORE_ENVIRONMENT=Production ;
user=root ;
stopsignal=INT


easy_install supervisor
  supervisord -c /etc/supervisor/supervisord.conf
  839  ps -ef|grep supervisor

supervisorctl reload



国内节点 安装 kcptun client

/root/kcptun/client_linux_amd64 -l :80 -r 107.182.27.193:80 -key eller -mtu 1400 -sndwnd 256 -rcvwnd 2048 -mode fast2 -conn 4  -sockbuf 16777217  2>&1 &


最后用了国内节点的 mtp 如下

https://t.me/proxy?port=80&secret=ee579b292c6e87db4d0e1ac6dcb598b1d062696e672e636f6&server=110.231.144.243

trouble shooting

 ./server_linux_amd64 
-bash: ./server_linux_amd64: cannot execute binary file: Exec format error

uname -a 
Linux vibrant-pipe-1.localdomain 4.19.0-5-686-pae #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) i686 GNU/Linux
root@vibrant-pipe-1:/data/apps# 


领导搞了个 32 bit机子  

不同端口的一个完整例子


abroad

78.141.217.7

 ---------- Telegram MTProto 配置信息 -------------

 主机 (Hostname) = 78.141.217.7

 端口 (Port) = 27784

 密钥 (Secret) = ddd65ebdc80f5a056dc9ea8354cd53b8

 Telegram 代理配置链接 = https://t.me/proxy?server=78.141.217.7&port=27784&secret=ddd65ebdc80f5a056dc9ea8354cd53b8


要放在 tmux 里面 不然会断的 or nohup 
./server_linux_amd64 -l :8083 -t 127.0.0.1:27784 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &


vultr ~]# ps  -ef   | grep  server
root      1145  1144  1 Jul21 ?        1-15:36:20 /root/kcptun/server_linux_amd64 -l :8083 -t 127.0.0.1:27784 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &

可见 kcptun server  mtp 都 在 


inland 

ip 103.39.214.6

  /root/kcptun/client_linux_amd64 -l :9004 -r 78.141.217.7:8083 -key eller -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 -conn 4   -sockbuf 16777217   2>&1 &



最后的 mtp url 


https://t.me/proxy?server=103.39.214.6&port=9004&secret=ddd65ebdc80f5a056dc9ea8354cd53b8

see also

kcptun 相关

https://github.com/xtaci/kcptun

shadowsocks利用kcptun转发加速的优势与不足

使用KCPTUN加速你的VPS

超级加速工具KCPTUN一键安装脚本 附100倍加速效果图

https://blog.csdn.net/weixin_33908217/article/details/93907651