Giter Site home page Giter Site logo

dragonite-network / dragonite-java Goto Github PK

View Code? Open in Web Editor NEW
804.0 72.0 101.0 1.41 MB

[DEPRECATED, please check https://github.com/tobyxdd/hysteria]

License: Apache License 2.0

Java 99.81% Shell 0.13% Dockerfile 0.06%
java reliable-udp reverse-proxy socks5-proxy socket

dragonite-java's Introduction

dragonite-java

INTERNET UNLEASHED.

powered by dragonite

https://t.me/DragoniteProject

This project is no longer being maintained and has been superseded by https://github.com/tobyxdd/hysteria

本项目已经停止维护,请使用续作 https://github.com/tobyxdd/hysteria

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.

See the Wiki page

Dragonite 是一个基于 UDP 的可靠传输协议,能针对高丢包与不稳定的网络极大提高传输速度。本项目有一系列基于 Dragonite 协议的应用,例如 TCP 双边加速流量转发工具加密 SOCKS5 代理

中文用户请加入 Telegram 群组

中文 Wiki 页面

TCP vs Dragonite

dragonite-java's People

Contributors

tobyxdd avatar wxdao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dragonite-java's Issues

在dragonite-sdk遇到一个问题

我用这个库作为一个RUDP来用,在使用过程中偶然遇到了一个情况,在我多个线程同时用同一个DragointeSocket发包的时候,一直卡在了SandHanlder类中的一个同步块中

protected void sendDataMessage_noSplit(final byte[] data) {
   // ........省略了一部分
            synchronized (state.sendWindowLock) {   
                while (!receiveHandler.checkWindowAvailable() && canSend()) {   
                    state.sendWindowLock.wait();   
                }   
            }   
   // ........省略了一部分code   
    }

我发现我有一个线程一直在这个同步块中出不来,麻烦的是这个情况不能稳定复现,于是我直接在wait()前面加了一句notifyAll,state.sendWindowLock.notifyAll();这样之后虽然短时间内没有再出现这个问题,但是我觉得可能是我在使用这个库的时候用法不对,所以想请教一下大大

DTLS support

In a traditional TCP stream, the transport layer security (TLS) could encrypt the full stream, provide both authorisation and encrypt with enough strength. The DTLS is based on TLS but for UDP stream. Is there any plan for dragonite project providing DTLS support in future?

不定时断线

06:14:07(Z) INFO Server welcome message: Welcome to vultr.guest
06:14:07(Z) INFO Connection established with /127.0.0.1:10700
07:05:38(Z) ERROR Cannot receive data from underlying socket: com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException: Connection is not alive
07:05:38(Z) ERROR Multiplexer is unable to send data: com.vecsight.dragonite.sdk.exception.SenderClosedException: Sender closed
07:05:38(Z) ERROR Multiplexer is unable to send data: com.vecsight.dragonite.sdk.exception.SenderClosedException: Sender closed
07:05:38(Z) ERROR Multiplexer is unable to send data: com.vecsight.dragonite.sdk.exception.SenderClosedException: Sender closed
07:05:39(Z) WARNING The underlying connection is no longer alive, reconnecting
07:05:39(Z) ERROR Unable to connect to remote server: java.io.IOException: Operation not permitted
07:05:40(Z) ERROR Unable to reconnect, there may be a network error or the server has been shut down: java.io.IOException: Operation not permitted
07:05:40(Z) WARNING The underlying connection is no longer alive, reconnecting
07:05:50(Z) ERROR Unable to connect to remote server: com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException: Connection is not alive
07:05:50(Z) ERROR Unable to reconnect, there may be a network error or the server has been shut down: com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException: Connection is not alive
07:05:50(Z) WARNING The underlying connection is no longer alive, reconnecting
07:05:50(Z) ERROR Unable to connect to remote server: java.io.IOException: Operation not permitted
07:05:51(Z) ERROR Unable to reconnect, there may be a network error or the server has been shut down: java.io.IOException: Operation not permitted
07:05:51(Z) WARNING The underlying connection is no longer alive, reconnecting
07:05:51(Z) ERROR Unable to connect to remote server: java.io.IOException: Operation not permitted

supevisor开了日志,记录如上。

两端程序进程并无挂掉,心急的话重启客户端能马上重连,如果等待的话要很长时间才能恢复连接,参数用的最基础的,tcp程序是SS,还套了udp2raw加密用。其它不变换kcptun不会发生。

所有装在局域网树莓派上。目前解决办法,每小时定时重启客户端。

望指导,是否是哪里参数需要调整?谢谢

Is dragonite suitable for game server ?

I have been writing a game server based on KCP, and today i find this project.
The performance diagram shows that it performs better than KCP and TCP BBR, so i am thinking about using this as an alternative to KCP for my game server.

无法连接到服务器,提示Connection is not alive

使用的是最新的dragonite-proxy
服务端
./dragonite-proxy -s -k secret -p 443
客户端

{
  "addr": "example.com",
  "password": "secret",
  "port": 443,
  "up": 20,
  "down": 100,
  "socks5port": 16666
}

服务端输出

02:26:59(-05) [INFO] Dragonite Proxy Version: v0.3.1
02:26:59(-05) [INFO] SDK Version: v0.3.3
02:26:59(-05) [INFO] Mux Version: v0.3.0
02:26:59(-05) [INFO] Checking for updates...
02:27:01(-05) [INFO] You are already using the latest version.
02:27:01(-05) [INFO] Using commandline arguments

客户端输出

15:32:50(+08) [INFO] Dragonite Proxy Version: v0.3.1
15:32:50(+08) [INFO] SDK Version: v0.3.3
15:32:50(+08) [INFO] Mux Version: v0.3.0
15:32:50(+08) [INFO] Checking for updates...
15:32:54(+08) [INFO] You are already using the latest version.
15:32:54(+08) [INFO] Using commandline arguments
15:33:05(+08) [ERROR] Unable to connect to remote server: com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException: Connection is not alive
15:33:05(+08) [ERROR] Unable to initialize: com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException: Connection is not alive

同样的操作,其实有时候又可以连接到服务器,并正常提供代理,但时好时坏的
使用ssh可以连通服务器,所以应该不是网络问题

need http proxy in client side

add http proxy in client side

  • Wish to add http proxy at the client side on same port or another port which can be configed in the json file

shadowsocks 无法正常和服务器建立连接,具体内容麻烦看描述

服务器端报错内容:

  • ERROR Unable to establish local connection: java.net.ConnectException: Connection refused (Connection refused)

客户端版本: ubuntu 16.04LTS
shadowsocks版本: Shadowsocks-Qt5-2.9.0
shadowsocks客户端配置:

  • ServerAddress: 127.0.0.1,
  • ServerPort: 10000,
  • LocalAddress: 127.0.0.1.
  • LocalPort: 1080

服务器端forwarder启动命令: ./dragonite-forwarder -s -f 10000
客户端forwarder启动命令: ./dragonite-forwarder -a myVpsIp -f 10000 -d 5 -u 1

补充:客户端启动forwarder能正常和服务器端forwarder建立连接,但是当打开客户端的shadowsocks,并创建指向ServerAddress为127.0.0.1的配置,也就是快速入门之:使用 dragonite forwarder 加速 Shadowsocks 连接中提到的访问本地暴露出的10000端口时,服务器端的forwarder程序会报上述错误。我已经尝试关闭防火墙并重试,但是并没有起到作用。希望作者如果有空的话,能帮忙解答,感谢!

全局看,使用了太多的线程

几乎是每个连接都需要5个线程的样子。
这样子一旦连接数超过100,线程数会过多,浪费CPU和内存。
是不是可以考虑,改造下,方案有两个:

  1. 用Quasar这个库,直接Fiber化。
  2. 用ExecuteService池化。

这是加速用的吗?

技术渣,没看明白,,这个是加速tcp用的?还是说,可以取代其他代理工具,比如酸酸乳

Error:JAVA_HOME is not set and could not be found

root@ubuntu:~/dragonite-proxy-0.3.1/bin# ./dragonite-proxy -s -k ******* -p **** -l 100

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Optional reliability?

Hello!

I've been looking for a good reliable UDP library for the core of a multiplayer game engine for quite a while. I've made a few aborted efforts to develop my own, but I've run into algorithm issues each time for which I've not found any decent solutions. I'm therefore quite excited to have stumbled upon dragonite-java.

In a game engine, messages between the client and server don't need to be 100% reliable. In other words, some types of messages absolutely need to have reliable delivery (the game cannot continue unless the messages reach the destination), but other types of messages can be lost in transit without affecting the game too badly. An example of the former type would be player deaths: If a player dies, the game would be in an inconsistent state if not all players received the message that a player had died. An example of the latter type would be player position updates: Position updates are broadcast dozens of times per second. If a position update gets lost, there's no need to wait around for it to be re-sent as the next one will be along in a few milliseconds anyway.

My questions are:

  1. Is it possible, in dragonite, to specify that I want some messages to be sent reliably and not others?

  2. If opt-in unreliability is supported, does the library preserve ordering for reliable and unreliable messages? In other words, if I send an unreliable message M1 followed by a reliable message M2, does the library guarantee that I won't receive M2 before M1 (by discarding M1 if M2 has already been delivered)?

[ERROR] Failed to parse config: java.nio.file.NoSuchFileException: server1.json

12:29:01(-04) [INFO] Dragonite Proxy Version: v0.3.1
12:29:01(-04) [INFO] SDK Version: v0.3.3
12:29:01(-04) [INFO] Mux Version: v0.3.0
12:29:01(-04) [INFO] Checking for updates...
12:29:03(-04) [INFO] ** New version available! v0.4.0 **
12:29:03(-04) [INFO] Using commandline arguments
12:29:03(-04) [ERROR] Failed to parse config: java.nio.file.NoSuchFileException: server1.json

windows客户端闪退 Crash

The windows client progrm crashed out after checking the updates , and the cmd window automatically shut down.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.