Commit graph

291 commits

Author SHA1 Message Date
adlyq
3d6aea4c1e feat: support uid rule
eg. UID,1000/5000-6000,Proxy
2022-04-22 16:27:51 +08:00
Skyxim
9e6ba64940 fix: add wait timeout, and log 2022-04-21 08:08:37 -07:00
Skyxim
bee1bddceb feat: add sniffer port whitelist, when empty will add all ports 2022-04-21 07:06:08 -07:00
yaling888
7ca1a03d73 Refactor: metadata use netip.Addr 2022-04-20 22:52:05 +08:00
yaling888
6c4791480e Chore: IpToAddr 2022-04-20 22:09:16 +08:00
MetaCubeX
42d853a7e6 chore: upgrade dependencies 2022-04-20 01:31:33 +08:00
Kr328
5d36d8b139 Improve: replace bootstrap dns (#2080) 2022-04-19 22:49:39 +08:00
yaling888
0ca10798ea Chore: fix typo 2022-04-19 22:38:20 +08:00
yaling888
3ea3653d7a Chore: persistence fakeip pool state 2022-04-19 22:37:47 +08:00
Skyxim
48a01adb7a refactor: sniffer param force and reverses deprecated, will be removed when release version, replace force-domain and skip-sni,
force-domain add '+' equivalent to force is true
sniffer:
  enable: true
  force-domain:
    - "google.com"
  skip-sni:
    - www.baidu.com
  sniffing:
    - tls
2022-04-17 20:02:13 +08:00
Skyxim
1cf9321aa0 fix: domain tree match failed 2022-04-16 11:55:49 +08:00
Skyxim
71a1f5dfbd fix: domain type fix Mapping 2022-04-16 09:51:31 +08:00
Skyxim
25426cba33 chore: log style 2022-04-16 09:04:43 +08:00
Skyxim
9d364f66e9 fix: reverse error when force is false 2022-04-16 08:53:31 +08:00
Skyxim
80764217c2 feat: add domain list for sniffer, reverse force logic
when force is false, if domain in the list, will force replace
when force is true, if sniff domain in the list, will skip it
2022-04-16 08:21:31 +08:00
Meta
1b6b0052c2 chore:adjust sniffer debuglog info 2022-04-13 08:38:55 +08:00
yaling888
4be17653e0 Fix: fakeip pool cycle used 2022-04-13 02:19:42 +08:00
Meta Gowork
21446ba5d4 chore: adjust code 2022-04-12 21:39:31 +08:00
yaling888
75ce6b59bf Refactor: fakeip pool use netip.Prefix, supports ipv6 range 2022-04-12 20:32:08 +08:00
Meta
ce96ac35fb chore:merge & adjust code 2022-04-12 20:20:04 +08:00
yaling888
a6eb11ce18 Refactor: DomainTrie use generics 2022-04-12 18:45:47 +08:00
yaling888
673541e2a8 Refactor: lrucache use generics 2022-04-12 18:44:07 +08:00
Meta Gowork
83e0abaa8c chore: adjust code 2022-04-11 13:23:59 +08:00
Skyxim
7166db2ac9 fix: code logic error 2022-04-10 20:01:35 +08:00
Skyxim
544e0f137d feat: sniffer support
sniffer:
  enable: true
  force: false # Overwrite domain
  sniffing:
    - tls
2022-04-09 22:30:36 +08:00
Skyxim
b2981f921c chore: reduce a little memory 2022-04-09 22:24:48 +08:00
Adlyq
7be3e617ab disable process name on android 2022-04-09 17:54:01 +08:00
Meta Gowork
6548dc90fa Merge remote-tracking branch 'Plus/with-tun' into Alpha 2022-04-02 20:48:11 +08:00
fishg
c495d314d4 feat: 添加tls sni 嗅探
# Conflicts:
#	tunnel/statistic/tracker.go
#	tunnel/tunnel.go
2022-03-31 21:27:25 +08:00
yaling888
e877b68179 Chore: revert "Feature: add tls SNI sniffing (#68)"
This reverts commit 24ce6622a2.
2022-03-31 21:20:46 +08:00
fishg
24ce6622a2 Feature: add tls SNI sniffing (#68) 2022-03-31 19:34:40 +08:00
MetaCubeX
81c5a65f23 Merge remote-tracking branch 'Pro-Plus/with-tun' into Alpha
# Conflicts:
#	README.md
#	adapter/outbound/trojan.go
#	adapter/outbound/vless.go
#	transport/trojan/trojan.go
2022-03-30 13:15:45 +08:00
yaling888
4502776513 Refactor: MainResolver 2022-03-28 00:44:13 +08:00
MetaCubeX
611ce5f5f1 [commit]
[Feat] add Pass type for support temporary skip rule set
2022-03-27 23:44:51 +08:00
yaling888
9bab2c504e Chore: regenerate protoc file 2022-03-27 07:12:12 +08:00
Meta
0d068e7b5f [Fixed]
弃用过期函数,修复Process Name获取问题
2022-03-26 16:17:44 +08:00
MetaCubeX
a593d68c42 build test 2022-03-24 23:42:49 +08:00
MetaCubeX
7a54d616c4 [SKIP CI]
Merge remote-tracking branch 'Pro-Plus/with-tun' into Alpha

# Conflicts:
#	README.md
#	hub/route/server.go
2022-03-23 13:23:34 +08:00
yaling888
ef915c94dc Feature: flush fakeip pool 2022-03-23 01:05:43 +08:00
yaling888
bac04ab54b Merge branch 'ogn-dev' into with-tun 2022-03-20 21:26:25 +08:00
MetaCubeX
d1838f663e Merge remote-tracking branch 'yaling888/with-tun' into Alpha
# Conflicts:
#	listener/tun/tun_adapter.go
2022-03-19 22:37:51 +08:00
MetaCubeX
2df890c4ee Merge remote-tracking branch 'clash/dev' into Alpha
# Conflicts:
#	Makefile
2022-03-19 14:53:47 +08:00
Kr328
30d4668008
Chore: fix typo (#2033) 2022-03-19 13:58:51 +08:00
MetaCubeX
9270d3c475 [内容]
1.autoIptables 开关
2.go.mod 调整
3.processName 调整
4.makefile 调整
5.Tun模块 部分代码调整
2022-03-19 01:11:27 +08:00
yaling888
546f2fa739 Chore: make fake ip pool start with the third ip 2022-03-18 05:17:47 +08:00
admin
68345b6a19 Merge remote-tracking branch 'upstream/Alpha' into Alpha 2022-03-17 23:40:51 +08:00
MetaCubeX
435bee0ca2 update 2022-03-17 23:24:07 +08:00
admin
92d169ca81 [Fix] Process name display for Android 2022-03-17 20:31:16 +08:00
MetaCubeX
30f1b29257 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
yaling888
8d0ae4284d Chore: use gateway address of fake ip pool as the TUN device address 2022-03-17 07:41:18 +08:00
MetaCubeX
609d69191a 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
yaling888
346d817dba Chore: Merge branch 'ogn-dev' into with-tun 2022-03-16 20:16:30 +08:00
Dreamacro
6a661bff0c Migration: go 1.18 2022-03-16 12:10:13 +08:00
MetaCubeX
f01ac69654 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
MetaCubeX
c85305ead8 [Skip CI] 2022-03-15 22:25:33 +08:00
yaling888
d486ee467a Fix: test 2022-03-15 03:39:45 +08:00
yaling888
5abd03e241 Fix: exclude the broadcast address to fake ip pool 2022-03-15 02:43:40 +08:00
MetaCubeX
68fccfacc0 [Skip CI] 2022-03-15 02:20:19 +08:00
MetaCubeX
cf52fbed65 [Skip CI] 2022-03-15 02:06:57 +08:00
yaling888
46b9a1092d Chore: embed the RuleExtra into Base 2022-03-13 01:22:05 +08:00
yaling888
8fbf93ccc8 Chore: Merge branch 'ogn-dev' into with-tun 2022-03-13 01:15:35 +08:00
Kr328
b866f06414
Chore: move find connection process to tunnel (#2016) 2022-03-12 19:07:53 +08:00
Kr328
9683c297a7
Chore: add more details to process resolving (#2017) 2022-03-09 13:41:50 +08:00
yaling888
8333815e95 Chore: refactor TUN 2022-03-09 05:08:35 +08:00
yaling888
71e002c2ef Merge branch 'ogn-dev' into with-tun 2022-03-09 00:30:38 +08:00
Kr328
83bfe521b1
Fix: should split linux process name with space (#2008) 2022-03-05 18:25:16 +08:00
yaling888
592b6a785e Fix: find process name by UDP network on macOS 2022-02-23 14:04:47 +08:00
yaling888
d876d6e74c Feature: resolve ip with a proxy adapter 2022-02-23 02:38:50 +08:00
yaling888
b192238699 Merge from remote branch 2022-02-23 01:00:27 +08:00
Dreamacro
03e4b5d525 Chore: use golangci-lint config file 2022-02-19 00:08:51 +08:00
Dreamacro
a0221bf897 Fix: routing-mark should effect on root 2022-02-17 14:23:47 +08:00
Clash-Mini
4a446c4e31 [build] 2022-02-06 01:59:35 +08:00
Clash-Mini
c28f42d823 [FEAT] Add geodata loader mode switch 2022-02-05 00:51:06 +08:00
Clash-Mini
2bf34c766e [Feat]
support trojan xtls
change geodataloader mode as memconservative
2022-02-04 23:33:36 +08:00
Clash-Mini
3b277aa8ec [Feat]
update gvisor
Chore: use "-m mark --mark" instead of "-m owner --uid-owner"
2022-02-04 06:11:24 +08:00
Clash-Mini
176eb3926b Merge remote-tracking branch 'pro-plus/plus-pro' into Feature
# Conflicts:
#	.github/workflows/Alpha.yml
#	.github/workflows/codeql-analysis.yml
#	.github/workflows/docker.yml
#	.github/workflows/linter.yml
#	.github/workflows/stale.yml
#	Makefile
#	README.md
#	adapter/outbound/vless.go
#	component/dialer/dialer.go
#	component/geodata/geodata.go
#	component/geodata/router/condition.go
#	config/config.go
#	config/initial.go
#	constant/metadata.go
#	constant/path.go
#	constant/rule.go
#	constant/rule_extra.go
#	dns/filters.go
#	go.mod
#	go.sum
#	hub/executor/executor.go
#	hub/route/configs.go
#	listener/listener.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/dev_windows_extra.go
#	listener/tun/dev/wintun/dll_windows.go
#	listener/tun/dev/wintun/session_windows.go
#	listener/tun/ipstack/gvisor/tun.go
#	listener/tun/ipstack/gvisor/tundns.go
#	listener/tun/ipstack/stack_adapter.go
#	listener/tun/ipstack/system/tun.go
#	listener/tun/tun_adapter.go
#	main.go
#	rule/base.go
#	rule/common/process.go
#	rule/geoip.go
#	rule/parser.go
#	rule/port.go
#	test/go.mod
#	test/go.sum
#	test/vless_test.go
#	transport/vless/xtls.go
#	tunnel/tunnel.go
2022-02-04 05:30:21 +08:00
Clash-Mini
776728fb30 [Feat]
update gvisor
Chore: use "-m mark --mark" instead of "-m owner --uid-owner"
2022-02-04 04:47:40 +08:00
Clash-Mini
1cdaf782ba Merge remote-tracking branch 'clash/dev' into Feature 2022-02-04 02:38:32 +08:00
yaling888
f1157d0a09 Chore: use "-m mark --mark" instead of "-m owner --uid-owner" 2022-02-02 21:59:44 +08:00
yaling888
6e9d837a7d Merge from remote branch 2022-01-28 19:51:40 +08:00
Dreamacro
b1a639feae Fix: domain trie search 2022-01-26 22:28:13 +08:00
Clash-Mini
9e4e1482d9 [chore] Replace Country.mmdb with GeoIP.dat 2022-01-26 12:01:14 +08:00
yaling888
c14dd79e69 Merge from remote branch 2022-01-05 01:46:37 +08:00
Maze.tsz
3bb32d12e0 Merge remote-tracking branch 'clash/dev' into Meta
# Conflicts:
#	.github/workflows/docker.yml
#	dns/server.go
#	go.mod
#	go.sum
#	hub/executor/executor.go
#	test/go.mod
#	test/go.sum
2022-01-04 17:31:07 +08:00
HamsterReserved
8679968ab0
Fix: multiple port string parsing overflow (#1868)
Ports in TCP and UDP should be parsed as an unsigned integer,
otherwise ports > 32767 get truncated to 32767. As this is
the case with Metadata.UDPAddr(), this fundamentally breaks
UDP connections where demand for high port numbers is high.

This commit fixes all known cases where ParseInt is used for ports,
and has been verified to fix Discord voice connections on port
50001~50004.

Fixes: d40e5e4fe6

Co-authored-by: Hamster Tian <haotia@gmail.com>
2022-01-02 01:09:29 +08:00
Dreamacro
204a72bbd3 Chore: remove forward compatible code 2022-01-02 00:48:57 +08:00
yaling888
5657aa50cf Merge from remote branch 2021-12-09 21:38:24 +08:00
Skyxim
c6f923041f Feature:Supported Rule-Set 2021-12-02 22:56:17 +08:00
maze.y2b@gmail.com
cb52682790 [style] 2021-12-01 16:51:31 +08:00
Maze.tsz
35cf39e415 Revert "[test] rule providers"
This reverts commit 078389f4f6.
2021-11-26 00:57:41 +08:00
maze.y2b@gmail.com
078389f4f6 [test] rule providers 2021-11-25 23:14:31 +08:00
Dreamacro
075d8ed094 Fix: fakeip pool cycle used 2021-11-23 22:01:49 +08:00
maze.y2b@gmail.com
f7393509a3 fix python310 2021-11-21 15:09:22 +08:00
Mazeorz
900e852525 [test] 2021-11-17 16:03:47 +08:00
yaling888
a412745314 Merge from remote branch 2021-11-11 00:54:43 +08:00
Dreamacro
499beb7344 Fix: bind iface should throw control error 2021-11-10 22:19:11 +08:00
yaling888
6bd186d3c0 Merge from remote branch 2021-11-09 21:11:38 +08:00
yaling888
4c6bb7178b Feature: resolve ip with proxy adapter 2021-11-09 19:44:16 +08:00
Dreamacro
c9be614821 Fix: windows arm7 build 2021-11-08 21:24:39 +08:00
bobo liu
bd2ea2b917
Feature: mark on socket (#1705) 2021-11-08 16:59:48 +08:00