Commit Graph

90 Commits

Author SHA1 Message Date
Micooz
e0d86ed328 core,presets: load libsoduium-wrappers on demand 2018-07-28 21:16:25 +08:00
Micooz
8198e3d06e src: weakly dependent on http2 module 2018-07-14 22:14:08 +08:00
Micooz
d223c7b002 core: refactor multiplexing 2018-06-24 13:30:03 +08:00
Micooz
9c3cf648e8 Merge branch 'master' into feature-http2-transport
* master: (39 commits)
  docs: update
  package: bump to v3.3.1
  bin: should delete more items in simple mode
  docs: add examples
  transports: set handshake timeout of ws to 10s
  lib: regen
  config: fix new URL() default port issue
  lint: fix
  package: upgrade eslint to v5.2.0
  docs: add "Test Using curl"
  docs: update
  src: add client side https proxy support
  package: upgrade winston to v3.0.0
  build: keep comments in lib/*.js
  ci: change NEXT_VERSION to 3.3.1
  docs: update
  lib: regen
  package: bump to v3.3.0
  docs: update
  transports,test: add "wss" transport
  ...

# Conflicts:
#	src/core/config.js
2018-06-15 23:12:07 +08:00
Micooz
ad934bf6c6 config: fix new URL() default port issue 2018-06-13 22:34:22 +08:00
Micooz
142f8f5d77 src: add client side https proxy support 2018-06-13 20:52:18 +08:00
Micooz
c42c618095 transports,test: add "wss" transport 2018-06-12 18:05:56 +08:00
Micooz
4e4addff55 config: remove "https" from supported client proxy protocol 2018-06-12 17:48:55 +08:00
Micooz
a6b877dd10 bin,src,test: add "tls_cert_self_signed" 2018-06-12 17:47:52 +08:00
Micooz
74ea2eb09f src,test: websocket now support pathname 2018-06-10 15:06:23 +08:00
Micooz
a706f42f7d WIP: http2 transport 2018-05-06 18:34:41 +08:00
Micooz
be9dd7adcc core: minor refactor 2018-05-06 18:32:31 +08:00
Micooz
1e8bcbe8a7 core,proxies: use WHATWG URL api instead of legacy URL api 2018-04-21 14:11:00 +08:00
Micooz
7d2cc6a5f4 src: support socks4(a), socks5 username/password authorization 2018-04-20 23:48:49 +08:00
Micooz
bbc1ce990c core/config: remove colorize() from logger 2018-03-29 19:18:49 +08:00
Micooz
2f429de44a package: upgrade winston and winston-daily-rotate-file to v3.x, restrict log_path to be a file 2018-03-18 12:50:38 +08:00
Micooz
88d0ddc28a core/config: expose getLogFilePath() 2018-02-22 21:11:33 +08:00
Micooz
86fd05e8f7 core/config: check "acl_conf" only when "acl" is true 2018-02-20 22:24:28 +08:00
Micooz
a60d3fcc9d core: re-implement ACL in core 2018-02-17 22:10:06 +08:00
Micooz
48d6e777dd *: reformat code 2018-02-17 12:19:31 +08:00
Micooz
c4bb2d1e74 src: bugfixs and improvements 2018-02-16 17:01:37 +08:00
Micooz
cdb2365030 bin,core: mark json.servers as deprecated 2018-02-16 17:01:37 +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
d63f0bfddc refactor: replace object with config prototype 2018-02-16 17:01:36 +08:00
Indexyz
6ba9db3ab0 fix: remove commited function 2018-02-16 17:01:36 +08:00
Indexyz
59902609ae refactor(config): dynamic config 2018-02-16 17:01:36 +08:00
Indexyz
48c3a2d70e core,transports: remove global object 2018-02-16 17:01:36 +08:00
Micooz
b785e20612 core,utils: move core/dns-cache.js to utils/, and refactor it 2018-02-05 14:23:26 +08:00
Micooz
24ec7b38f2 core: fix udp relay 2017-12-26 15:59:29 +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
27a1c748fe
bin,core: refactor config.js, remove "dstaddr" 2017-12-19 11:23:04 +08:00
Micooz
fd17714e77
core: pre-init presets at startup 2017-11-24 14:21:34 +08:00
Micooz
6424498fad
core: display a warning when provide redundant presets 2017-11-09 15:49:37 +08:00
Micooz
c9ce5fe3ae core: fix type of "port" parsed from url.parse() 2017-10-25 21:49:25 +08:00
Micooz
889b2bd6e6 src: refine api interfaces 2017-10-21 11:57:58 +08:00
Micooz
cd15044aa4
core: disable json output to log files 2017-10-18 13:54:31 +08:00
Micooz
6200a9ce9a core: add "dstaddr" option to config.js 2017-10-14 22:47:09 +08:00
Micooz
8294d87bf8
core,test: support "service" option in config 2017-10-13 16:56:49 +08:00
Micooz
21f4a33c4b core: print logs when load cert.pem or key.pem 2017-10-07 17:02:12 +08:00
Micooz
68a595c426
core,bin: add "log_max_days" option 2017-09-26 11:08:55 +08:00
Micooz
596c51db3d
core,test: deprecated __IS_TLS__ 2017-09-19 14:04:40 +08:00
Micooz
730db0f29f
core: remove unnessarty check and bring "redirect" back 2017-09-05 14:36:11 +08:00
Micooz
f921ce9415 core: ignore action emitter itself when broadcast 2017-09-03 12:22:25 +08:00
Micooz
fff076711f
*: fix mode 2017-08-31 18:01:28 +08:00
Micooz
bae4be4452
core,test: refine config.js 2017-08-31 14:53:45 +08:00
Micooz
86637782b4 core,bin: refine "transport" structure 2017-08-22 10:54:25 +08:00
Micooz
82d240c582 core: refine tls config stuff 2017-08-21 21:09:39 +08:00
Micooz
1ffb7800de utils: refine logger config/import 2017-08-20 22:01:30 +08:00