Commit Graph

249 Commits

Author SHA1 Message Date
Skyxim
6857b05039 chore: pure udp metadata 2022-10-02 20:08:41 +08:00
adlyq
9b89ff9f2d feat: support sub-rule, eg.
rules:
  - SUB-RULE,(AND,((NETWORK,TCP),(DOMAIN-KEYWORD,google))),TEST2
  - SUB-RULE,(GEOIP,!CN),TEST1
  - MATCH,DIRECT

sub-rules:
  TEST2:
    - MATCH,Proxy
  TEST1:
    - RULE-SET,Local,DIRECT,no-resolve
    - GEOSITE,CN,Domestic
    - GEOIP,CN,Domestic
    - MATCH,Proxy
2022-09-06 17:30:35 +08:00
x2c3z4
4f291fa513
Chore: show the source ip in log (#2284)
Co-authored-by: Li Feng <fengli@smartx.com>
2022-09-02 16:59:00 +08:00
Dreamacro
3946d771e5 Feature: sync missing resolver logic from premium, but still net.IP on opensource 2022-08-13 13:07:35 +08:00
metacubex
02933ae568 Fix: nil pointer 2022-08-12 12:49:35 +08:00
metacubex
65a289e16f Chore: clean code 2022-08-12 03:04:58 +08:00
Dreamacro
d71a2ce61e Fix: fakeip udp should not replace with another ip 2022-07-24 00:02:45 +08:00
Skyxim
947d9d4560 chore: clean up code 2022-07-13 22:27:49 +08:00
Dreamacro
5497adaba1 Fix: fakeip udp should not replace with another ip 2022-07-05 21:09:29 +08:00
Dreamacro
aaf08dadff
Change: remove AddrType on Metadata (#2199) 2022-07-05 20:26:43 +08:00
Skyxim
1b3b5b4dfe fix: find process error 2022-06-14 23:14:43 +08:00
Skyxim
2e6bdc5636 feat: add param general.enable-process, it will always find process or uid, default value is false 2022-06-14 23:08:07 +08:00
Skyxim
be298cfa16 refactor: finding process and uid should to find with match process or uid rule, reduce memory allocation 2022-06-14 22:52:56 +08:00
Dreamacro
23063ae0b9
fix: make CodeQL happy Dreamacro 2022-06-09 17:59:17 +08:00
Skyxim
d32ab9ce74 fix: 规则匹配默认策略组返回错误 2022-06-09 13:52:02 +08:00
Dreamacro
3360839fe3 Chore: make CodeQL happy 2022-06-01 21:38:05 +08:00
Skyxim
067c02aba1 fix: 调整获取远程目的的位置 2022-05-28 20:01:27 +08:00
Skyxim
ac36473d13 refactor: 获取远程目的从tunnel中剔除,移至tracker 2022-05-27 09:00:48 +08:00
Skyxim
72fb153fe0 refactor: 优化UDP远程目标获取 2022-05-26 23:41:09 +08:00
adlyq
149b4b5b43 feat: RESTful API support disable sniffer 2022-05-24 13:44:52 +08:00
adlyq
cc1c1340a3 feat: 安卓恢复进程规则,可通过enable-process开关,默认true 2022-05-19 20:44:09 +08:00
CHIZI-0618
5bd5f1bfda chore: remove Script mode residual code. 2022-05-14 13:00:33 +08:00
adlyq
df8196a68c fix: print process path logic 2022-05-12 18:57:30 +08:00
Skyxim
27aa026568 fix: use actual metadata 2022-05-04 20:13:12 +08:00
Skyxim
fb58595d44 feat: Expose remote destination (udp proxy maybe domain of node) 2022-05-04 16:57:08 +08:00
Skyxim
a38b2bcb6d Merge remote-tracking branch 'meta/Alpha' into Alpha 2022-04-28 08:56:00 +08:00
Skyxim
2e74986fe4 refactor: adjust provider loading order, remove meaningless pointers 2022-04-28 08:55:45 +08:00
Kr328
cca3a1a934 Fix: http proxy Upgrade behavior (#2097) 2022-04-27 12:38:31 +08:00
Kr328
6a92c6af4e
Fix: http proxy Upgrade behavior (#2097) 2022-04-25 19:50:20 +08:00
adlyq
3d6aea4c1e feat: support uid rule
eg. UID,1000/5000-6000,Proxy
2022-04-22 16:27:51 +08:00
Meta Gowork
3f6d2e5f91 feat: dnsHijack support "any"
chore: adjust process debug display logic
2022-04-22 13:30:04 +08:00
yaling888
7ca1a03d73 Refactor: metadata use netip.Addr 2022-04-20 22:52:05 +08:00
MetaCubeX
42d853a7e6 chore: upgrade dependencies 2022-04-20 01:31:33 +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
ce96ac35fb chore:merge & adjust code 2022-04-12 20:20:04 +08:00
yaling888
173e10abe6 Chore: fix typos 2022-04-12 19:08:13 +08:00
Skyxim
544e0f137d feat: sniffer support
sniffer:
  enable: true
  force: false # Overwrite domain
  sniffing:
    - tls
2022-04-09 22:30:36 +08:00
MetaCubeX
91e48b707b Merge remote-tracking branch 'yaling888/with-tun' into Alpha 2022-04-05 14:44:40 +08:00
fishg
7a8af90b86 feat: add SMTPS/POP3S/IMAPS port to sni detect 2022-04-05 03:26:23 +08:00
Meta Gowork
6548dc90fa Merge remote-tracking branch 'Plus/with-tun' into Alpha 2022-04-02 20:48:11 +08:00
fishg
afdcb6cfc7 fix: log level ajust and lint fix 2022-03-31 21:27:25 +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
Meta
ffff1418f2 [Fixed]尝试修复PASS空指针问题
[Chore]调整workflows测试
2022-03-28 16:36:34 +08:00
yaling888
fe76cbf31c Chore: code style 2022-03-28 03:18:51 +08:00
MetaCubeX
611ce5f5f1 [commit]
[Feat] add Pass type for support temporary skip rule set
2022-03-27 23:44:51 +08:00
Adlyq
4cc661920e [Fix] redir-host use host not ip 2022-03-22 23:31:23 +08:00
MetaCubeX
5b7f46bc97 [skip ci][内容]
1.调整部分代码
2022-03-20 02:39:48 +08:00
MetaCubeX
435bee0ca2 update 2022-03-17 23:24:07 +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
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
yaling888
3a9bbf6c73 Fix: should keep alive in tcp relay 2022-03-16 18:17:28 +08:00
MetaCubeX
016862f7a5 [build test]1.18 2022-03-16 17:54:44 +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
yaling888
20b66d9550 Style: code style 2022-03-15 02:55:06 +08:00
yaling888
46b9a1092d Chore: embed the RuleExtra into Base 2022-03-13 01:22:05 +08:00
Kr328
b866f06414
Chore: move find connection process to tunnel (#2016) 2022-03-12 19:07:53 +08:00
yaling888
ba7bcce895 Chore: code style 2022-03-09 00:32:21 +08:00
yaling888
2f234cf6bc Feature: process condition for rules 2022-02-23 14:01:53 +08:00
yaling888
b192238699 Merge from remote branch 2022-02-23 01:00:27 +08:00
Skyxim
8595d6c2e9 [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
Clash-Mini
610c79570a make tun config compatible with premium 2022-01-05 11:24:00 +08:00
Clash-Mini
9475799615 make tun config compatible with premium 2022-01-05 00:33:42 +08:00
Skyxim
a78b89d16e 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
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
Mazeorz
900e852525 [test] 2021-11-17 16:03:47 +08:00
Dreamacro
bcb301b730 Chore: adjust all udp alloc size 2021-11-03 22:29:24 +08:00
yaling888
2680e8ffa3 Merge from remote branch 2021-10-28 11:36:11 +08:00
yaling888
2953772a0e Style: format code 2021-10-28 00:06:55 +08:00
Dreamacro
ebbc9604ce Chore: use uber max procs 2021-10-27 21:27:19 +08:00
Dreamacro
967932d02c Fix: set dnsmode behavior 2021-10-18 23:03:25 +08:00
Dreamacro
81d5da51a3 Fix: unexpected proxy dial behavior on mapping mode 2021-10-18 21:08:27 +08:00
Dreamacro
68753b4ae1 Chore: contexify ProxyAdapter ListenPacket 2021-10-15 21:44:53 +08:00
Dreamacro
f1cf7e9269 Style: use gofumpt for fmt 2021-10-10 23:44:09 +08:00
yaling888
4cc16e0136 Feature: add source ipcidr condition for all rules 2021-08-31 21:46:04 +08:00
yaling888
ba2fd00f01 Merge from remote branch 2021-07-28 22:13:21 +08:00
ayanamist
53e17a916b
Chore: logging remote port on request (#1494) 2021-07-19 15:31:38 +08:00
yaling888
5852245045
Merge from remote branch 2021-07-07 03:53:32 +08:00
yaling888
56dff65149 Feature: support multiport condition for rule SRC-PORT and DST-PORT 2021-07-06 15:07:05 +08:00
Dreamacro
d755383e39 Chore: move provider interface to constant 2021-07-06 00:31:13 +08:00
yaling888
d7732f6ebc Code: refresh code 2021-07-01 22:49:29 +08:00
Kr328
b6ff08074c
Refactor: plain http proxy (#1443) 2021-06-15 17:13:40 +08:00
Dreamacro
6091fcdfec Style: code style 2021-06-13 17:23:10 +08:00
Dreamacro
045edc188c Style: code style 2021-06-10 14:05:56 +08:00
Dreamacro
824f5bd731 Fix: reuse http connection broken on previous commit 2021-05-07 11:08:46 +08:00
Dreamacro
3f3db8476e Fix: HTTP inbound leak 2021-05-06 22:34:37 +08:00
Dreamacro
3aefa1d924 Chore: some chores 2021-04-05 13:31:10 +08:00
Dreamacro
7ee49f5171 Fix: HTTP server should close when Connection is close 2021-03-30 16:33:49 +08:00
wwqgtxx
5da1b2a8aa
Fix: set metadata.AddrType if host is ip string after remove host (#1291) 2021-03-12 17:41:37 +08:00
Dreamacro
f7f97ef625 Fix: some HTTP proxy request broken 2021-03-10 16:23:55 +08:00
Dreamacro
5acdd72a1d Fix: remove host if host is ip string 2021-03-10 12:49:30 +08:00
Jason Lyu
f53686103d
Chore: reset udp timeout after sending each packet (#1260) 2021-02-26 10:40:55 +08:00
Kr328
cd48f69b1f
Fix: wrap net.Conn to avoid using *net.TCPConn.(ReadFrom) (#1209) 2021-02-01 20:06:45 +08:00
Dreamacro
f4de055aa1 Refactor: make inbound request contextual 2021-01-23 14:58:09 +08:00
Keyi Xie
02d029dd2d
Fix: close http Response body on provider (#1154) 2020-12-29 11:28:22 +08:00
Dreamacro
994cbff215 Fix: should not log rule when rule = nil 2020-11-22 23:38:12 +08:00