Commit Graph

18 Commits

Author SHA1 Message Date
Micooz
e0d86ed328 core,presets: load libsoduium-wrappers on demand 2018-07-28 21:16:25 +08:00
Micooz
133bf07ffc presets: remove actions.js, move to src/constants.js 2018-05-04 22:08:36 +08:00
Micooz
b54914a6b7 presets: use uint64ToBuffer() instead of numberToBuffer() 2018-04-26 13:48:55 +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
2753075765 eslint: enable "no-undef" and "object-curly-spacing" 2018-03-30 12:09:48 +08:00
Micooz
48d6e777dd *: reformat code 2018-02-17 12:19:31 +08:00
Micooz
1fcf4e2f6c core: fix onCache 2018-02-16 17:01:36 +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
d7883321f3
src: rename constants
- MIDDLEWARE_DIRECTION_UPWARD -> PIPE_ENCODE
- MIDDLEWARE_DIRECTION_DOWNWARD -> PIPE_DECODE
2017-10-19 11:19:32 +08:00
Micooz
34acc66a1d presets: add chacha20-poly1305 security support for v2ray-vmess 2017-10-15 12:17:42 +08:00
Micooz
8e72dec75c
presets: fix access bug to static members 2017-09-20 14:22:26 +08:00
Micooz
17e621237f presets: typo 2017-09-19 22:29:49 +08:00
Micooz
8436de0124 presets: fix "out of range" bug in v2ray-vmess 2017-09-18 22:52:01 +08:00
Micooz
e10ae03f74
presets: add v2ray-vmess support 2017-09-13 15:02:02 +08:00