Total Pageviews

Wednesday 13 December 2017

Dragonite

A reliable application level data transport protocol based on UDP, highly optimized for lossy & unstable networks. (Java version) 

Dragonite is a reliable application level data transport protocol based on UDP. Highly optimized for lossy & unstable networks. Use cases include
  • Transfer data between countries over lossy network connections
  • Your application needs a persistent connection to your servers, without interference from NAT gateways
  • Firewall blocking TCP
Dragonite Network Project contains a series of Dragonite-based network applications.
Dragonite 是一个基于 UDP 的可靠传输协议,能针对高丢包与不稳定的网络极大提高传输速度本项目有一系列基于 Dragonite 协议的应用,例如 TCP 双边加速流量转发工具加密 SOCKS5 代理
中文用户请加入 Telegram 群组
from  https://github.com/dragonite-network/dragonite-java
----------------------------------

Dragonite:一个双边加速工具


Dragonite是JAVA开发的,所以需要服务端和客户端都安装JAVA环境。
Windows在这里下载JAVA安装包就能安装了:
https://www.java.com/zh_CN/download/windows-64bit.jsp
下面是Debian10配置Dragonite加速Shadowsocks的简易方法,首先安装需要用到的工具:
apt -y update
apt -y install default-jre
apt -y install shadowsocks-libev supervisor wget nano unzip
编辑ss配置文件:
nano /etc/shadowsocks-libev/config.json
使用下面的配置:
{
    "server":"0.0.0.0",
    "mode":"tcp_and_udp",
    "server_port":20001,
    "local_port":1080,
    "password":"shadowsocks密码",
    "timeout":60,
    "method":"chacha20-ietf-poly1305"
}
重启ss:
systemctl restart shadowsocks-libev
systemctl enable shadowsocks-libev
下载dragonite:
cd /opt
wget https://github.com/dragonite-network/dragonite-java/releases/download/fwd-0.4.0-prx-0.4.0/dragonite-forwarder-0.4.0.zip
unzip dragonite-forwarder-0.4.0.zip
cd dragonite-forwarder-0.4.0/bin
放在前台测试运行一下,看能不能正常工作:
./dragonite-forwarder -s -f 20001
可以话的退出来新建一个supervisor的配置文件:
nano /etc/supervisor/conf.d/dragonite.conf
写入下面的配置:
[program:dragonite]
priority=1
directory=/opt/dragonite-forwarder-0.4.0/bin
command=/opt/dragonite-forwarder-0.4.0/bin/dragonite-forwarder -s -f 20001
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/supervisor/dragonite.log
更新supervisor配置/设置开机自启:
supervisorctl update
systemctl enable supervisor
客户端这边开一个powershell,进入到程序的bin目录下:
cd C:\Users\LALA\Desktop\dragonite-forwarder-0.4.0\bin
使用下面的命令运行程序:
.\dragonite-forwarder -a 服务器公网IP -f 20001 -d 100 -u 30
其中-d是指你的本地宽带下行速率,-u是上行速率,单位是Mbps。
最后在ss内添加一个节点.
-------------------

利用dragonite-proxy翻墙

登陆linux vps.
wget https://github.com/dragonite-network/dragonite-java/releases/download/fwd-0.4.0-prx-0.4.0/dragonite-proxy-0.4.0.zip
mkdir dragonite-proxy-0.4.0
mv dragonite-proxy-0.4.0.zip dragonite-proxy-0.4.0
cd dragonite-proxy-0.4.0
unzip dragonite-proxy-0.4.0.zip
cd dragonite-proxy-0.4.0
cp samples/sample-server-full.json bin/server-full.json
cd bin
nano server-full.json
(其内容为:
{
  "server": true,
  "addr": "0.0.0.0",
  "port": 9225,
  "password": "我的密码",
  "limit": 100,
  "loopback": false,
  "mtu": 1300,
  "multiplier": 4,
  "dscp": 0
}
nano /etc/systemd/system/dragonite-proxy-0.4.0.service
(其内容为:
[Unit]
After=network.target

[Service]
ExecStart=/root/dragonite-proxy-0.4.0/dragonite-proxy-0.4.0/bin/dragonite-proxy -c /root/dragonite-proxy-0.4.0/dragonite-proxy-0.4.0/bin/server-full.json
Restart=always

[Install]
WantedBy=multi-user.target )

然后,
systemctl start dragonite-proxy-0.4.0
systemctl enable dragonite-proxy-0.4.0
服务器端搭建完成。

在本地机器mac上。
wget https://github.com/dragonite-network/dragonite-java/releases/download/fwd-0.4.0-prx-0.4.0/dragonite-proxy-0.4.0.zip
mkdir dragonite-proxy-0.4.0
mv dragonite-proxy-0.4.0.zip dragonite-proxy-0.4.0
cd dragonite-proxy-0.4.0
unzip dragonite-proxy-0.4.0.zip
cd dragonite-proxy-0.4.0
cp samples/sample-client-full.json bin/client-full.json
cd bin
nano client-full.json
(其内容为:
{
  "server": false,
  "addr": "vps-public-ip",
  "port": 9225,
  "socks5port": 1081,
  "password": "我的密码",
  "up": 20,
  "down": 100,
  "mtu": 1300,
  "multiplier": 4,
  "dscp": 0
} )

然后,
./dragonite-proxy -c client-full.json
不要关闭此terminal.

然后设置浏览器的socks5 proxy为127.0.0.1 ,端口1081 ,浏览器即可翻墙。

项目地址:
https://github.com/dragonite-network/dragonite-java/wiki/dragonite-proxy-%E4%B8%AD%E6%96%87%E4%BB%8B%E7%BB%8D
https://github.com/dragonite-network/dragonite-java/releases

注:此法没有socks5-proxy-by-yuanrenguang715(https://briteming.blogspot.com/2020/05/socks5-proxy-by-yuanrenguang715.html)稳定。

我从这个程序dragonite-proxy的配置文件是没看出它在哪里进行了加密,但是从这个issue:
https://github.com/dragonite-network/dragonite-java/issues/8
作者说:“All packets are encrypted with AES if you turn on encryption, so I would say the payload itself should have no special "pattern". Theoretically, it's possible to detect Dragonite by the traffic patterns. But it should be hard。“
只是怎么样“turn on encryption”?根本没看到打开加密的选项在哪里。