Commit graph

251 commits

Author SHA1 Message Date
gVisor bot
652759a9ae [skip ci][内容]
1.调整部分代码
2022-03-20 02:39:48 +08:00
gVisor bot
b8c9a1bf6d update 2022-03-17 23:24:07 +08:00
gVisor bot
db31cfbd7f Merge remote-tracking branch 'yaling888/with-tun' into Alpha
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	.github/workflows/linter.yml
#	.github/workflows/release.yml
#	Makefile
#	README.md
#	adapter/outbound/vless.go
#	component/geodata/memconservative/cache.go
#	component/geodata/router/condition.go
#	component/geodata/router/condition_geoip.go
#	component/geodata/standard/standard.go
#	component/geodata/utils.go
#	config/config.go
#	config/initial.go
#	constant/metadata.go
#	constant/path.go
#	constant/rule.go
#	constant/rule_extra.go
#	dns/client.go
#	dns/filters.go
#	dns/resolver.go
#	go.mod
#	go.sum
#	hub/executor/executor.go
#	hub/route/configs.go
#	listener/listener.go
#	listener/tproxy/tproxy_linux_iptables.go
#	listener/tun/dev/dev.go
#	listener/tun/dev/dev_darwin.go
#	listener/tun/dev/dev_linux.go
#	listener/tun/dev/dev_windows.go
#	listener/tun/dev/wintun/config.go
#	listener/tun/dev/wintun/dll_windows.go
#	listener/tun/dev/wintun/session_windows.go
#	listener/tun/dev/wintun/wintun_windows.go
#	listener/tun/ipstack/commons/dns.go
#	listener/tun/ipstack/gvisor/tun.go
#	listener/tun/ipstack/gvisor/tundns.go
#	listener/tun/ipstack/gvisor/utils.go
#	listener/tun/ipstack/stack_adapter.go
#	listener/tun/ipstack/system/dns.go
#	listener/tun/ipstack/system/tcp.go
#	listener/tun/ipstack/system/tun.go
#	listener/tun/tun_adapter.go
#	main.go
#	rule/common/base.go
#	rule/common/domain.go
#	rule/common/domain_keyword.go
#	rule/common/domain_suffix.go
#	rule/common/final.go
#	rule/common/geoip.go
#	rule/common/geosite.go
#	rule/common/ipcidr.go
#	rule/common/port.go
#	rule/parser.go
#	rule/process.go
#	test/go.mod
#	test/go.sum
#	transport/vless/xtls.go
#	tunnel/tunnel.go
2022-03-17 17:41:02 +08:00
gVisor bot
50ab57c72e Merge remote-tracking branch 'clash/dev' into Alpha
# Conflicts:
#	.github/workflows/docker.yml
#	adapter/outboundgroup/fallback.go
#	adapter/outboundgroup/loadbalance.go
#	adapter/outboundgroup/relay.go
#	adapter/outboundgroup/selector.go
#	adapter/outboundgroup/urltest.go
#	config/config.go
#	go.mod
#	go.sum
#	main.go
#	test/go.mod
#	test/go.sum
2022-03-17 01:41:51 +08:00
gVisor bot
446fd99436 Chore: Merge branch 'ogn-dev' into with-tun 2022-03-16 20:16:30 +08:00
gVisor bot
9e3260a172 Fix: should keep alive in tcp relay 2022-03-16 18:17:28 +08:00
gVisor bot
a57355aae3 [build test]1.18 2022-03-16 17:54:44 +08:00
gVisor bot
907c68c9cb Migration: go 1.18 2022-03-16 12:10:13 +08:00
gVisor bot
f7759c1468 Merge remote-tracking branch 'clash/dev' into Alpha
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	.github/workflows/docker.yml
#	.github/workflows/linter.yml
#	.github/workflows/stale.yml
#	Makefile
#	component/dialer/dialer.go
#	config/config.go
#	constant/metadata.go
#	constant/rule.go
#	rule/common/domain.go
#	rule/common/domain_keyword.go
#	rule/common/domain_suffix.go
#	rule/common/final.go
#	rule/common/ipcidr.go
#	rule/geoip.go
#	rule/parser.go
#	rule/port.go
#	rule/process.go
2022-03-15 23:13:41 +08:00
gVisor bot
fb7ba942c7 Style: code style 2022-03-15 02:55:06 +08:00
gVisor bot
dc0339e399 Chore: embed the RuleExtra into Base 2022-03-13 01:22:05 +08:00
gVisor bot
14b581cd8d Chore: move find connection process to tunnel (#2016) 2022-03-12 19:07:53 +08:00
gVisor bot
f8e9902530 Chore: code style 2022-03-09 00:32:21 +08:00
gVisor bot
13db80b23a Feature: process condition for rules 2022-02-23 14:01:53 +08:00
gVisor bot
7f0de1861a Merge from remote branch 2022-02-23 01:00:27 +08:00
gVisor bot
6a78bca9fb [Feature]
1.Add Network rule, match network type(TCP/UDP)
2.Add logic rules(NOT,OR,AND)
-AND,((DOMAIN,baidu.com),(NETWORK,UDP)),REJECT

(cherry picked from commit d7092e2e37f2c48282c878edea1b2ebc2912b09a)
2022-01-22 22:37:07 +08:00
gVisor bot
3fe8a4777d make tun config compatible with premium 2022-01-05 11:24:00 +08:00
gVisor bot
f507672d4b make tun config compatible with premium 2022-01-05 00:33:42 +08:00
gVisor bot
0256d0e387 Revert: Revert Redir-Host, please add fallback dns and append proxy adapter
DNS pass proxy use:
- protocol://ip:port#AdapterName
- protocol://ip:port/query#AdapterName

sure as:
- tls://1.1.1.1:853#DNS
2021-12-06 22:45:59 +08:00
gVisor bot
590565f5c1 Feature:Supported Rule-Set 2021-12-02 22:56:17 +08:00
gVisor bot
c5257c5190 [style] 2021-12-01 16:51:31 +08:00
gVisor bot
e69c54cfcd [test] 2021-11-17 16:03:47 +08:00
gVisor bot
cc9ff5ccd7 Chore: adjust all udp alloc size 2021-11-03 22:29:24 +08:00
gVisor bot
f7d136f56c Merge from remote branch 2021-10-28 11:36:11 +08:00
gVisor bot
0387c93c56 Style: format code 2021-10-28 00:06:55 +08:00
gVisor bot
c964c4901c Chore: use uber max procs 2021-10-27 21:27:19 +08:00
gVisor bot
285ac79771 Fix: set dnsmode behavior 2021-10-18 23:03:25 +08:00
gVisor bot
a40706ba21 Fix: unexpected proxy dial behavior on mapping mode 2021-10-18 21:08:27 +08:00
gVisor bot
50a2222cd2 Chore: contexify ProxyAdapter ListenPacket 2021-10-15 21:44:53 +08:00
gVisor bot
653f2de2c0 Style: use gofumpt for fmt 2021-10-10 23:44:09 +08:00
gVisor bot
66d9aab6cc Feature: add source ipcidr condition for all rules 2021-08-31 21:46:04 +08:00
gVisor bot
2e762b39b7 Merge from remote branch 2021-07-28 22:13:21 +08:00
gVisor bot
7fa486ea4c Chore: logging remote port on request (#1494) 2021-07-19 15:31:38 +08:00
gVisor bot
8b2f737511 Merge from remote branch 2021-07-07 03:53:32 +08:00
gVisor bot
c586479a13 Feature: support multiport condition for rule SRC-PORT and DST-PORT 2021-07-06 15:07:05 +08:00
gVisor bot
e259cea893 Chore: move provider interface to constant 2021-07-06 00:31:13 +08:00
gVisor bot
38c102a93d Code: refresh code 2021-07-01 22:49:29 +08:00
gVisor bot
225c875ed4 Refactor: plain http proxy (#1443) 2021-06-15 17:13:40 +08:00
gVisor bot
894e2843d5 Style: code style 2021-06-13 17:23:10 +08:00
gVisor bot
542325aae4 Style: code style 2021-06-10 14:05:56 +08:00
gVisor bot
d560c2c023 Fix: reuse http connection broken on previous commit 2021-05-07 11:08:46 +08:00
gVisor bot
6cc17af658 Fix: HTTP inbound leak 2021-05-06 22:34:37 +08:00
gVisor bot
709287e74b Chore: some chores 2021-04-05 13:31:10 +08:00
gVisor bot
c21bd48213 Fix: HTTP server should close when Connection is close 2021-03-30 16:33:49 +08:00
gVisor bot
b1d7346175 Fix: set metadata.AddrType if host is ip string after remove host (#1291) 2021-03-12 17:41:37 +08:00
gVisor bot
436dc91dd4 Fix: some HTTP proxy request broken 2021-03-10 16:23:55 +08:00
gVisor bot
9b229b15e7 Fix: remove host if host is ip string 2021-03-10 12:49:30 +08:00
gVisor bot
8f09aa0444 Chore: reset udp timeout after sending each packet (#1260) 2021-02-26 10:40:55 +08:00
gVisor bot
633de52aee Fix: wrap net.Conn to avoid using *net.TCPConn.(ReadFrom) (#1209) 2021-02-01 20:06:45 +08:00
gVisor bot
be5a2a9adf Refactor: make inbound request contextual 2021-01-23 14:58:09 +08:00
gVisor bot
b283869c72 Fix: close http Response body on provider (#1154) 2020-12-29 11:28:22 +08:00
gVisor bot
0649a919f4 Fix: should not log rule when rule = nil 2020-11-22 23:38:12 +08:00
gVisor bot
212a3de654 Chore: log rule msg on dial error 2020-11-22 19:12:36 +08:00
gVisor bot
f0ecf5b8d4 Chore: more detailed error when dial failed 2020-11-20 00:27:37 +08:00
gVisor bot
c744fa8f05 Fix: tunnel manager & tracker race condition (#1048) 2020-10-29 17:51:14 +08:00
gVisor bot
a794f38317 Improve: #1038 and #1041 2020-10-29 00:32:31 +08:00
gVisor bot
f066687f93 Fix: tunnel UDP race condition (#1043) 2020-10-28 21:26:50 +08:00
gVisor bot
4d68d20b7b Chore: deprecated eapache/channels 2020-10-20 17:44:39 +08:00
gVisor bot
76bab33d01 Fix: missing fake-ip record should return error 2020-10-17 12:52:43 +08:00
gVisor bot
623d261932 Chore: sync necessary changes from premium 2020-09-21 22:22:07 +08:00
gVisor bot
1cd2b8d8fb Chore: split enhanced mode instance (#936)
Co-authored-by: Dreamacro <305009791@qq.com>
2020-09-17 10:48:42 +08:00
gVisor bot
d8c0fcb9b3 Chore: use only one goroutine to handle statistic (#940) 2020-09-03 10:30:18 +08:00
gVisor bot
e8603ddeb1 Improve: use atomic for connection statistic (#938) 2020-09-02 16:34:12 +08:00
gVisor bot
6ca03f5a90 Chore: pass staticcheck 2020-08-25 22:19:59 +08:00
gVisor bot
0078ac2fc8 Fix: invert should resolve ip (#836) 2020-07-27 13:47:00 +08:00
gVisor bot
17a0dc479a Chore: rename NoResolveIP to ShouldResolveIP 2020-07-27 11:57:55 +08:00
gVisor bot
b93708d929 Chore: add rule payload in log 2020-07-18 19:22:09 +08:00
gVisor bot
f7aa21c0e5 Chore: move experimental features to stable 2020-06-27 14:19:31 +08:00
gVisor bot
c6e82884b4 Change: local resolve DNS in UDP request due to TURN failed 2020-06-12 23:39:03 +08:00
gVisor bot
2d92d0002f Feature: connections add rule payload 2020-06-07 17:28:56 +08:00
gVisor bot
1849fe0974 Chore: mode use lower case (backward compatible) 2020-06-01 00:32:37 +08:00
gVisor bot
d957aacef8 Fix: typo (#657) 2020-04-27 22:20:35 +08:00
gVisor bot
40832885c4 Fix: redir-host should lookup hosts 2020-04-27 21:28:24 +08:00
gVisor bot
0b60be9438 Improve: pool buffer alloc 2020-04-25 00:30:40 +08:00
gVisor bot
dc9ae1edd0 Improve: recycle buffer after packet used 2020-04-16 18:19:36 +08:00
gVisor bot
5bb81b70d6 Fix: udp traffic track (#608) 2020-03-28 20:05:38 +08:00
gVisor bot
bf90c7e9bb Chore: support MarshalYAML to some config filed (#581) 2020-03-15 19:40:39 +08:00
gVisor bot
ad551c1e30 Fix: TPROXY fakeip (#572) 2020-03-10 20:36:24 +08:00
gVisor bot
05d45cbedc Fix: vmess udp crash 2020-02-17 17:34:19 +08:00
gVisor bot
38e0b9da50 Feature: add default-nameserver and outbound interface 2020-02-15 21:42:46 +08:00
gVisor bot
584305897c Fix: should prehandle metadata before resolve 2020-02-07 20:53:43 +08:00
gVisor bot
ea8ec7993f Chore: udp resolve ip on local 2020-01-31 19:26:33 +08:00
gVisor bot
9cbe2b8ed2 Fix: match log display 2020-01-31 14:58:54 +08:00
gVisor bot
adfe73b48e Improve: udp NAT type 2020-01-31 14:43:54 +08:00
gVisor bot
2553026028 Chore: export reset manager statistic api (#476) 2020-01-11 00:20:10 +08:00
gVisor bot
830febd5f8 Fix: udp crash 2019-12-31 14:47:00 +08:00
gVisor bot
95f06ab9b9 Improve: UDP relay refactor (#441)
Co-authored-by: Dreamacro <Dreamacro@vip.qq.com>
2019-12-28 18:44:01 +08:00
gVisor bot
77b38b3285 Chore: distinguish udp request in log (#449) 2019-12-27 20:11:51 +08:00
gVisor bot
ecc943997d Feature: add experimental provider 2019-12-08 12:17:24 +08:00
gVisor bot
ba7dd209fc Fix: HTTP inbound proxy can't close correctly 2019-12-07 23:37:42 +08:00
gVisor bot
2a75f9aa1e Fix: new tracker crash when rule is nil 2019-10-28 12:58:39 +08:00
gVisor bot
f046ad73d2 Feature: add no-resolve for ip rules (#375) 2019-10-28 00:02:23 +08:00
gVisor bot
93f13c627c Feature: add experimental connections API 2019-10-27 21:44:07 +08:00
gVisor bot
b34604523c Fix: HTTP proxy should copy body 2019-10-26 22:13:15 +08:00
gVisor bot
2adb586a78 Fix: some UDP issues (#265) 2019-10-11 20:11:18 +08:00
gVisor bot
4994510c87 Feature: move hosts to the top 2019-09-14 20:01:08 +08:00
gVisor bot
eb341b8721 Fix: don't close connection on status 100 Continue and header Proxy-Connection: Keep-Alive (#294) 2019-09-12 10:22:08 +08:00
gVisor bot
843116b780 Fix: HTTP status code 100 Continue support" (#288)
* Fix: HTTP Status Code `100 Continue` support

* Style: code style adjustment
2019-09-08 12:21:28 +09:00
gVisor bot
5431e51554 Optimization: socks UDP & fix typo (#261) 2019-08-12 14:01:32 +08:00
gVisor bot
b6532b1f0f Fix: crash in handleConn 2019-08-10 20:14:24 +08:00
gVisor bot
69980e4ca3 Feature: trace adapters when dialing (#170) 2019-08-09 01:28:37 +08:00
gVisor bot
7db0522a51 Fix: typo (#246) 2019-07-29 10:12:10 +08:00
gVisor bot
592c3c160f Fix(socks5): fully udp associate support (#233) 2019-07-25 17:47:39 +08:00
gVisor bot
83f3bec20c Feature: custom dns ipv4/ipv6 dual stack 2019-06-29 00:58:59 +08:00
gVisor bot
7528b012c4 Fix: udp crash in tunnel 2019-05-16 18:40:20 +08:00
gVisor bot
7062bb4bba Feature: add DST-PORT and SRC-PORT 2019-05-09 21:00:29 +08:00
gVisor bot
9c315339fd Feature: support fakeip 2019-05-03 00:05:14 +08:00
gVisor bot
358344da70 Feature: add experimental config for resolving ip fail behavior 2019-04-24 12:02:52 +08:00
gVisor bot
b9b8632362 Fix: add missing error check 2019-04-24 10:29:29 +08:00
gVisor bot
c02b16b446 Feature: socks5 udp associate 2019-04-23 23:30:13 +08:00
gVisor bot
e3614e0605 Style: rename Generator with Dial 2019-03-03 11:59:07 +08:00
gVisor bot
41531ddec9 Fix: http request keepAlive with right http header 2019-03-03 11:51:15 +08:00
gVisor bot
5f26c49641 Fix: crash when directly request proxy server 2019-02-18 20:14:18 +08:00
gVisor bot
3ea1046c4f Fix: redir-host mode crash 2019-02-11 17:20:42 +08:00
gVisor bot
09f6cd2ec4 Fix: tun2socks not lookup IP 2019-02-11 15:44:42 +08:00
gVisor bot
d292743981 Feature: SOURCE-IP-CIDR rule type (#96) 2019-02-02 21:03:13 +08:00
gVisor bot
4ae154494c Improve: lazy resolve ip 2019-02-02 20:47:38 +08:00
gVisor bot
b71bd07424 Chore: improve programming style (#109) 2019-01-29 23:46:18 +08:00
gVisor bot
c8366739ee Chore: improve outbound architecture 2018-12-22 23:56:42 +08:00
gVisor bot
e16efb3819 Fix: don't keepalive when connection is close (#65)
fixed #60
2018-12-10 11:48:57 +08:00
gVisor bot
4e33035730 Fix: dns crash & remove unused debug log 2018-12-10 11:00:52 +08:00
gVisor bot
81ade5cfca Feature: add custom DNS support (#56) 2018-12-05 21:13:29 +08:00
gVisor bot
c04f3748c3 Fix: patch config API 2018-11-28 10:38:30 +08:00
gVisor bot
35b40e77a3 Change: replace FINAL with MATCH in a progressive way 2018-11-21 18:21:24 +08:00
gVisor bot
0dd9b38514 Chore: improve code architecture 2018-11-21 13:47:46 +08:00
gVisor bot
3f865d2861 Optimization: reduce the memory of each TCP relay 2018-10-21 20:28:40 +08:00
gVisor bot
f73013006a Chore: make the code more semantic 2018-09-30 12:25:52 +08:00
gVisor bot
3338642eed Improve: cleanup code 2018-09-21 11:33:29 +08:00
gVisor bot
e8206f0f2b Improve: better relay copies 2018-09-17 00:15:58 +08:00
gVisor bot
c7da6e888e Fix: close connection when response closed 2018-08-31 21:24:10 +08:00
gVisor bot
8d91482f7b Improve: HTTP proxy server handler 2018-08-27 00:06:40 +08:00
gVisor bot
3df8ee56d6 Improve: clean code 2018-08-12 16:18:58 +08:00
gVisor bot
2aa9bcaf9c New: custom socks5 proxy support 2018-08-12 13:50:54 +08:00
gVisor bot
6c38fce2cb Fix: issue #3 2018-08-11 22:51:30 +08:00
gVisor bot
ab8181de1b Fixed: global mode and update log level 2018-08-04 23:04:16 +08:00
gVisor bot
2a6db98d67 Improve: config convergent and add log-level 2018-07-26 00:04:59 +08:00
gVisor bot
102d74281f Fix: typo 2018-07-18 21:50:16 +08:00
gVisor bot
f2f5abd70c Update: add config route 2018-07-15 22:23:20 +08:00
gVisor bot
eec0030f84 Add: selector and proxys & rules router 2018-07-12 23:28:38 +08:00
gVisor bot
fbd5dfd3b5 Improve: add log level 2018-06-22 13:15:20 +08:00
gVisor bot
b6495c8dd2 Add: config hub route 2018-06-20 22:41:02 +08:00
gVisor bot
739a4ca033 Fixed: the configuration can now be updated correctly 2018-06-19 20:31:36 +08:00
gVisor bot
002c782051 Add: external controller 2018-06-18 11:31:49 +08:00
gVisor bot
f584173b11 Add: Record network traffic 2018-06-17 22:41:32 +08:00
gVisor bot
e06d17994d Add: url-test proxy group support 2018-06-16 21:34:13 +08:00
gVisor bot
f60647430e Fixed: throw error when shadowsocks cipher type wrong 2018-06-16 15:41:26 +08:00
gVisor bot
d92b20438e Fixed: race condition in update config 2018-06-15 00:49:52 +08:00
gVisor bot
21f94aa5f0 Improve: using native http request 2018-06-14 01:00:58 +08:00
gVisor bot
9474399611 Fixed: remove proxys and rules then update config 2018-06-13 13:38:46 +08:00
gVisor bot
1a8f363ea6 Improve: simple dns prefetch 2018-06-11 18:36:39 +08:00