Commit Graph

12 Commits

Author SHA1 Message Date
Micooz
2733305df9 hub: add _udpCleanerTimer 2018-05-05 15:51:13 +08:00
Micooz
100f1fe48d presets: use this.resolveTargetAddress() instead of broadcast(...) 2018-04-15 20:34:59 +08:00
Micooz
d1dedef8e6 presets: use onInitTargetAddress() instead of onNotified() to get target address 2018-04-15 19:59:39 +08:00
Micooz
48d6e777dd *: reformat code 2018-02-17 12:19:31 +08:00
Micooz
4b7c2e091c src,test: isolate config among presets 2018-02-16 17:01:36 +08:00
Indexyz
d355ed9065 refactor: replace ctx with config
refactor: set static config for preset
2018-02-16 17:01:36 +08:00
Indexyz
48c3a2d70e core,transports: remove global object 2018-02-16 17:01:36 +08:00
Micooz Lee
80a6e69653
Add multiplexing support (#94)
* core,presets,transports: add initial mux support

* core,presets: holy shit

* core,transports: fix fix

* core: some fix to multiplexer

* still not working, too complex

* transports: add mux

* core: pass "extraArgs" as the second parameter during piping

* src: first working version of mux

* core,presets: properly close sub connection from client

* core/multiplexer: fix stuck at the second connection

* core/multiplexer: split class into MuxClient and MuxServer

* core/multiplexer: pick a random mux relay to transfer encoded data on server side

* core,transports: remove "mux" transport and make mux on TLS work

* presets/tracker: only dump result when preset destroyed

* lint: fix

* core: bring preparePresets() to module scope

* transports/tcp: fix inbound destroy behaviour for mux

* utils: fix getRandomInt()

* core/multiplexer: fix getRandomMuxRelay()

* core/multiplexer: distinguish relay self-close and protocol(mux)-close

* test: add test for "mux"

* transports/websocket: prevent calling "on()" on null this._socket

* presets: add class IPresetAddressing

* core: wrap mux protocol inside custom protocol stack

* core: pass remoteInfo to new Relay() to correct remote address in log

* core: fix bugs and improve stability

* src: add/remove TODOs

* core/relay: store remoteInfo rather than context

* core/relay: fix a bug

* docs: update
2017-12-25 16:42:01 +08:00
Micooz
cc0278d243 src: compatible with shadowsocks udp addessing 2017-10-26 22:28:47 +08:00
Micooz
68aa678925
presets: implement udp based protocols 2017-10-26 17:59:09 +08:00
Micooz
a81eea0401
presets: fix base-auth 2017-10-20 11:03:02 +08:00
Micooz
e0a51ab7e8
presets: deprecated base-auth-stream and base-with-padding, add base-auth 2017-10-20 10:56:03 +08:00