Commit Graph

27 Commits

Author SHA1 Message Date
Micooz
e0d86ed328 core,presets: load libsoduium-wrappers on demand 2018-07-28 21:16:25 +08:00
Micooz
c236329079 presets(ss-aead-cipher): add aes-128-ccm, aes-192-ccm and aes-256-ccm 2018-07-07 18:48:27 +08:00
Micooz
748ebe9aaa presets: use increment* helpers to increase nonce 2018-04-25 22:49:13 +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
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
8d0fa29891 core: add mux-relay and refactor multiplexing 2018-02-03 21:38:47 +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
68aa678925
presets: implement udp based protocols 2017-10-26 17:59:09 +08:00
Micooz
ba16b706d1 presets: add chacha20-* support for ss-aead-cipher
- chacha20-poly1305
- chacha20-ietf-poly1305
- xchacha20-ietf-poly1305
2017-10-14 22:55:13 +08:00
Micooz
1b17e08288 presets: refine ss-aead-cipher and ss-stream-cipher 2017-10-14 12:26:25 +08:00
Micooz
8e72dec75c
presets: fix access bug to static members 2017-09-20 14:22:26 +08:00
Micooz
d7e348b592
presets: improve performance and reduce memory usage 2017-09-08 10:47:36 +08:00
Micooz
2fd99f6303 presets: check data length after verify for two aead ciphers 2017-09-03 17:16:18 +08:00
Micooz
eafa5e9aff
presets: refine parameters check 2017-08-31 15:31:44 +08:00
Micooz
14484038e6
docs: update presets 2017-08-29 11:06:22 +08:00
Micooz
e9eca38110 presets: dump details when fail 2017-08-28 22:41:25 +08:00
Micooz
4e16d5b88e presets: fix class name 2017-08-08 15:53:00 +08:00
Micooz
66bf720385 fix(eslint): no-useless-escape 2017-06-18 20:07:06 +08:00
Micooz
fffca228e7 refactor(utils): bring blinksocks-utils back to blinksocks 2017-06-11 22:55:46 +08:00
Micooz
a333eb1408 refactor(utils): use "blinksocks-utils" package instead 2017-04-23 19:47:05 +08:00
Micooz
91acafae75 chore(presets): adjust MIN_CHUNK_SPLIT_LEN to 0x0800 2017-04-22 16:13:47 +08:00
Micooz
de56e2f96d refactor(presets): extract "getUTC", "stb", "hmac" and "HKDF" to utils.js 2017-04-22 14:10:58 +08:00
Micooz
df1a705b73 refactor(utils): extract getChunks() into utils.js, add getRandomChunks() 2017-04-21 17:28:36 +08:00
Micooz
0079380d36 refactor(core): robust design for middlewares
close: #40
2017-04-13 16:43:54 +08:00