Compare commits

..

136 Commits

Author SHA1 Message Date
A-BO
46495fc982 geoview: update to 0.2.2 2025-12-30 16:28:47 +08:00
A-BO
b13eaeac8b geoview: update to 0.2.0 2025-12-29 20:20:13 +08:00
A-BO
b0390584f1 microsocks: fix C90 compliance 2025-12-29 20:14:45 +08:00
lwb1978
3b1d5902c8 naiveproxy: update to 143.0.7499.109-2 2025-12-27 10:57:05 +08:00
github-actions[bot]
8f2f15fb84 sing-box: update to 1.12.14 (#555)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-25 22:58:31 +08:00
A-BO
ee78424347 microsocks: add socks5 forwarding rules support (#553)
A self modified enhanced version prepared for optimizing passwall functionality.

Version from: https://github.com/lwb1978/microsocks/tree/forward
2025-12-23 16:13:43 +08:00
github-actions[bot]
9feb8ca7db v2ray-geosite: update to 202512202213 (#551)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-21 20:02:02 +08:00
zhusir
aa5df69448 v2ray-geodata: update PKG_RELEASE
fixed #550
2025-12-21 15:49:56 +08:00
github-actions[bot]
6c8844d889 v2ray-geosite: update to 202512182214 (#548)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-19 21:31:52 +08:00
github-actions[bot]
5e2351aed3 v2ray-geoip: update to 202512180020 (#549)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-19 21:31:20 +08:00
github-actions[bot]
74f2a4e852 sing-box: update to 1.12.13 (#547)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-14 02:01:06 +08:00
github-actions[bot]
97d3a4378b v2ray-geoip: update to 202512110022 (#546)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-14 02:00:50 +08:00
github-actions[bot]
d707ba9d19 v2ray-geosite: update to 202512122214 (#545)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-14 02:00:29 +08:00
github-actions[bot]
3761828fc7 shadowsocks-rust: update to 1.24.0 (#544)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-12 00:07:14 +08:00
zhusir
b37a3f1ce3 ci: update the community action version to the latest 2025-12-10 23:06:02 +08:00
A-BO
5656b81fd4 ci: optimize code (#543) 2025-12-09 10:54:43 +08:00
github-actions[bot]
da0627faa6 xray-core: update to 25.12.8 (#541) 2025-12-08 22:50:07 +08:00
github-actions[bot]
af03baae97 v2ray-geosite: update to 202512072213 (#542) 2025-12-08 22:49:53 +08:00
github-actions[bot]
0e981dc382 v2ray-geoip: update to 202512040022 (#540) 2025-12-08 22:49:37 +08:00
xiaobaishu1
e84163436a xray-core: update to 25.12.2 (#539) 2025-12-02 23:22:36 +08:00
github-actions[bot]
52a52b8706 xray-core: update to 25.12.1 (#538)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-02 00:31:52 +08:00
github-actions[bot]
e73f07a42c v2ray-geosite: update to 202511262214 (#536)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-11-27 14:43:54 +08:00
github-actions[bot]
863dc44c9c v2ray-geoip: update to 202511270021 (#537)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-11-27 14:43:23 +08:00
github-actions[bot]
82902620e6 v2ray-geosite: update to 202511152210 (#535)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-11-17 00:25:17 +08:00
zhusir
4952cc9385 ci: optimize code (#533)
Removed peter-evans/create-pull-request and replaced it with GH for submitting PRs.
Fixed the error issue when creating PRs with peter-evans/create-pull-request.
2025-11-16 03:14:46 +08:00
A-BO
050beb5e7a dns2socks: update source url 2025-11-11 01:51:08 +08:00
github-actions[bot]
27effca2f4 sing-box: update to 1.12.12 (#532)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-27 23:45:58 +08:00
zhusir
4a47915807 action: update patches code 2025-10-27 18:11:08 +08:00
github-actions[bot]
f6ead0f3d0 hysteria: update to 2.6.5 (#531)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-24 14:01:45 +08:00
github-actions[bot]
18727f6425 sing-box: update to 1.12.11 (#529)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-23 00:24:33 +08:00
github-actions[bot]
d3d10ffdec v2ray-plugin: update to 5.41.0 (#528)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-16 20:07:05 +08:00
github-actions[bot]
12cbfd7e61 xray-core: update to 25.10.15 (#527)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-15 20:00:55 +08:00
github-actions[bot]
b31b081883 sing-box: update to 1.12.10 (#524)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-15 00:16:58 +08:00
github-actions[bot]
e731804edf v2ray-geoip: update to 202510090019 (#526)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-15 00:16:44 +08:00
github-actions[bot]
b2021007b3 v2ray-geosite: update to 202510132212 (#525)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-15 00:16:27 +08:00
A-BO
2c4e93d9df naiveproxy: update to 140.0.7339.123-3 2025-10-05 23:06:45 +08:00
github-actions[bot]
09e9364146 sing-box: update to 1.12.9 (#522)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-05 20:49:44 +08:00
github-actions[bot]
2045b3fa6d v2ray-plugin: update to 5.40.0 (#521)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-04 14:25:43 +08:00
github-actions[bot]
0acff3d08d hysteria: update to 2.6.4 (#520)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-10-02 14:58:18 +08:00
A-BO
0d2efd4530 geoview: update to 0.1.11 2025-10-01 10:18:45 +08:00
github-actions[bot]
10e7a49795 v2ray-geosite: update to 202509222213 (#519)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-23 21:31:04 +08:00
github-actions[bot]
df1e6b2fb9 v2ray-geoip: update to 202509180019 (#518)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-23 21:30:36 +08:00
A-BO
b55023d283 naiveproxy: update to 140.0.7339.123 2025-09-23 01:19:33 +08:00
zhusir
ccdd94acf7 ci: update code 2025-09-20 14:58:33 +08:00
github-actions[bot]
fa5ab9ac3b sing-box: update to 1.12.8 (#517)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-13 14:57:15 +08:00
github-actions[bot]
94007bd610 sing-box: update to 1.12.7 (#516) 2025-09-13 10:04:09 +08:00
github-actions[bot]
bdc1d4900f sing-box: update to 1.12.6 (#515)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-13 03:03:18 +08:00
github-actions[bot]
700aff15d7 hysteria: update to 2.6.3 (#514)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-12 13:32:25 +08:00
github-actions[bot]
510a0eebf7 v2ray-geosite: update to 202509102212 (#513)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-11 14:17:04 +08:00
github-actions[bot]
07659e6cb1 v2ray-geoip: update to 202509110019 (#512)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-11 14:16:54 +08:00
github-actions[bot]
879fdb8625 sing-box: update to 1.12.5 (#511)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-11 00:54:22 +08:00
github-actions[bot]
f23e172f27 xray-core: update to 25.9.11 (#510)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-10 23:07:16 +08:00
github-actions[bot]
f3a2b00d73 xray-core: update to 25.9.10 (#509)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-10 13:44:03 +08:00
github-actions[bot]
06076d0f16 xray-core: update to 25.9.5 (#508)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-05 19:17:35 +08:00
github-actions[bot]
5f0a7e852c v2ray-geosite: update to 202509042355 (#507)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-05 19:17:16 +08:00
github-actions[bot]
c465bf9dbc v2ray-geoip: update to 202509050108 (#506)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-09-05 19:16:50 +08:00
github-actions[bot]
f002d6d83f xray-core: update to 25.8.31 (#503)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-31 22:35:19 +08:00
github-actions[bot]
180a522405 v2ray-geosite: update to 202508302212 (#502)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-31 22:34:53 +08:00
github-actions[bot]
3140dcaada v2ray-geoip: update to 202508280020 (#504)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-31 22:34:27 +08:00
zxl hhyccc
6f115e283a trojan-plus: update boost1.89 build patch. (#501) 2025-08-30 22:13:05 +08:00
georgekart
9d0068ca00 xray-core: update to 25.8.29 (#500) 2025-08-30 18:58:29 +08:00
zxl hhyccc
0e4b2c7146 trojan-plus: optimize boost version check. (#499) 2025-08-28 23:26:04 +08:00
github-actions[bot]
dfdc4bd967 sing-box: update to 1.12.4 (#498)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-28 19:13:57 +08:00
zxl hhyccc
3c53404aa9 trojan-plus: Optimize whether to automatically configure boost-system based on the boost version (#497)
* trojan-plus: Optimize whether to automatically configure `boost-system` based on the `boost version`
2025-08-28 07:25:51 +08:00
zxl hhyccc
e8628f1f83 trojan-plus: Fix boost 1.89 ver build. (#495)
boost 1.89 versions: Boost.System is now a header-only library.
2025-08-27 23:59:29 +08:00
github-actions[bot]
3aebc56033 v2ray-geosite: update to 202508252213 (#493)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-26 13:19:08 +08:00
zhusir
971e52ab41 ci: update lang package from openwrt packages master branch 2025-08-26 13:12:23 +08:00
github-actions[bot]
4d0a296d2d v2ray-geosite: update to 202508232212 (#490)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-24 17:00:11 +08:00
github-actions[bot]
e5c8bcc648 v2ray-geoip: update to 202508210019 (#491)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-24 16:59:41 +08:00
github-actions[bot]
e39ff2fd2e sing-box: update to 1.12.3 (#489)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-21 13:59:05 +08:00
github-actions[bot]
0ec208d54f sing-box: update to 1.12.2 (#488)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-20 13:06:14 +08:00
lwb1978
bdbf127a6f naiveproxy: update to 139.0.7258.62-1 2025-08-18 17:43:19 +08:00
lwb1978
31dfddb721 chinadns-ng: update to 2025.08.09 2025-08-13 09:56:39 +08:00
A-BO
a04a1b6d8d ci: update code 2025-08-12 23:44:24 +08:00
github-actions[bot]
1b3c818c37 sing-box: update to 1.12.1 (#487)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-11 12:51:41 +08:00
lwb1978
0b2fdafe60 tcping: update mirror hash 2025-08-09 18:07:50 +08:00
A-BO
15a0472832 tcping: add PKG_VERSION 2025-08-09 08:59:17 +08:00
A-BO
5df9042439 shadowsocksr-libev: update mirror hash 2025-08-09 07:55:46 +08:00
A-BO
b90e1713ca trojan-plus: update mirror hash 2025-08-09 01:04:23 +08:00
A-BO
28e06e2945 shadowsocksr-libev: update mirror hash 2025-08-09 01:03:18 +08:00
A-BO
e272564355 shadowsocks-libev: update mirror hash 2025-08-09 01:02:14 +08:00
A-BO
a1dc7fd196 tcping: update from immortalwrt 2025-08-09 01:00:38 +08:00
A-BO
e18c5b351c simple-obfs: update from immortalwrt 2025-08-06 22:19:25 +08:00
A-BO
1013e7cb1d sing-box: update from immortalwrt 2025-08-05 22:50:16 +08:00
georgekart
7684dd29ac sing-box: Remove with_reality_server flag (#484)
Seemingly in 1.12.0 the with_reality_server flag was depricated, seeing as it's missing on here https://sing-box.sagernet.org/installation/build-from-source/ hence I think it should be removed from here as well.
2025-08-05 11:57:00 +08:00
Bard
80646ef634 sing-box: remove deprecated with_ech build flag (#483)
* The with_ech flag has been removed in version v1.12.0

Signed-off-by: sbwml <admin@cooluc.com>
2025-08-04 20:42:15 +08:00
github-actions[bot]
6dd3dbf255 sing-box: update to 1.12.0 (#482)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-04 19:07:13 +08:00
github-actions[bot]
c680014407 xray-core: update to 25.8.3 (#481)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-08-04 01:01:16 +08:00
zhusir
127f1d68ee ci: update code 2025-08-02 01:24:54 +08:00
github-actions[bot]
c5a0b87599 v2ray-geosite: update to 202507302215 (#480)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-31 16:07:44 +08:00
github-actions[bot]
a74408beb8 v2ray-geoip: update to 202507310022 (#479)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-31 16:07:24 +08:00
lwb1978
e9eee9dad1 v2ray-geodata: replace project repository 2025-07-31 16:03:22 +08:00
A-BO
ebd6a1122a action: update code 2025-07-27 11:00:28 +08:00
A-BO
950c9a2358 action: update code 2025-07-26 22:12:54 +08:00
github-actions[bot]
be30ceb2fc xray-core: update to 25.7.26 (#477)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-26 21:46:29 +08:00
A-BO
6451e3044a ci: add auto cache software release jsons 2025-07-26 14:00:39 +08:00
github-actions[bot]
65a532af6d xray-core: update to 25.7.25 (#476)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-26 00:10:19 +08:00
zhusir
df4119416e Revert "xray-core: update to 25.7.25 (#473)" (#475)
This reverts commit c1c5ce7a73.
2025-07-26 00:05:01 +08:00
github-actions[bot]
c1c5ce7a73 xray-core: update to 25.7.25 (#473)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-25 21:12:11 +08:00
github-actions[bot]
de8682f076 xray-core: update to 25.7.24 (#472)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-24 12:44:03 +08:00
github-actions[bot]
0e2ad0fe4d xray-core: update to 25.7.23 (#470)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-23 21:07:18 +08:00
A-BO
b50c786682 ci: use github mirror for routing feed to avoid 503 errors 2025-07-21 22:37:51 +08:00
lwb1978
e08c8dfd1a tcping: adjust install dir 2025-07-21 17:07:13 +08:00
github-actions[bot]
e6a199fc38 v2ray-plugin: update to 5.37.0 (#468)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-20 16:46:40 +08:00
A-BO
000742a169 Revert "shadowsocks-libev: update hash"
This reverts commit 40c90d39ae.
2025-07-13 12:47:04 +08:00
github-actions[bot]
a28eba5113 sing-box: update to 1.11.15 (#467)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-08 21:48:01 +08:00
A-BO
641342cca4 chinadns-ng: remove ipset depends
close: https://github.com/xiaorouji/openwrt-passwall-packages/issues/466
2025-07-07 22:39:18 +08:00
github-actions[bot]
ab25735f6f v2ray-geoip: update to 202507050144 (#465)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-06 01:58:40 +08:00
A-BO
3ee23f6a63 shadow-tls: update to latest commit
Co-Authored-By: Tianling Shen <i@cnsztl.eu.org>
2025-07-05 14:16:39 +08:00
github-actions[bot]
0199e7da2f shadowsocks-rust: update to 1.23.5 (#464)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-07-05 07:27:05 +08:00
github-actions[bot]
0584bb2386 v2ray-geosite: update to 20250627153051 (#463)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-30 19:54:26 +08:00
A-BO
40c90d39ae shadowsocks-libev: update hash
Co-Authored-By: coolsnowwolf <31687149+coolsnowwolf@users.noreply.github.com>
2025-06-30 00:10:22 +08:00
binge8
a70fec5946 naiveproxy: upgraded to v138.0.7204.35-r1 (#462) 2025-06-29 17:52:49 +08:00
A-BO
79f5321c34 action: golang update to 1.25.x 2025-06-28 09:21:43 +08:00
A-BO
82a500d16e chinadns-ng: update to 2025.06.20 2025-06-23 23:00:50 +08:00
lwb1978
a9c1791d2b shadow-tls: update to 0.2.25 2025-06-23 01:40:58 +08:00
github-actions[bot]
cfdd24cc7c sing-box: update to 1.11.14 (#460)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-19 13:05:27 +08:00
github-actions[bot]
03d812825e v2ray-plugin: update to 5.33.0 (#459)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-14 17:41:20 +08:00
github-actions[bot]
9dd5068028 xray-core: update to 25.6.8 (#457)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-08 22:36:04 +08:00
github-actions[bot]
673bb1efa5 v2ray-geosite: update to 20250608120644 (#458)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-08 22:35:44 +08:00
github-actions[bot]
e656847cbc hysteria: update to 2.6.2 (#455)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-08 15:13:31 +08:00
github-actions[bot]
6b9b9edbd5 xray-core: update to 25.6.7 (#451)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-07 22:45:36 +08:00
github-actions[bot]
6dedf1ff7f v2ray-geosite: update to 20250605152911 (#452)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-07 22:45:21 +08:00
github-actions[bot]
654155f851 v2ray-geoip: update to 202506050146 (#454)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-07 22:45:09 +08:00
binge8
9a6878bb6a naiveproxy: upgraded to v137.0.7151.44-r2 2025-06-06 16:10:24 +08:00
github-actions[bot]
39f9daa045 sing-box: update to 1.11.13 (#449)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-06-05 01:19:47 +08:00
binge8
5f4b2c4711 naiveproxy upgraded to v137.0.7151.44-r1 (#448) 2025-05-31 18:08:05 +08:00
binge8
3ae13b4391 naiveproxy upgraded to v136.0.7103.44-r2 (#447) 2025-05-27 09:39:02 +08:00
lwb1978
6ec933a419 geoview: update to 0.1.10 2025-05-22 10:59:40 +08:00
github-actions[bot]
a6a3c45a30 sing-box: update to 1.11.11 (#446)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-18 22:01:23 +08:00
github-actions[bot]
925712ba92 xray-core: update to 25.5.16 (#445)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-16 23:42:02 +08:00
github-actions[bot]
7add3c4ed9 v2ray-geosite: update to 20250508005311 (#443)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-16 01:12:52 +08:00
github-actions[bot]
6b9682be44 v2ray-geoip: update to 202505050146 (#444)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-16 01:12:26 +08:00
github-actions[bot]
b02cb18262 shadowsocks-rust: update to 1.23.4 (#442)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-13 00:53:17 +08:00
github-actions[bot]
be5412a7c2 shadowsocks-rust: update to 1.23.3 (#441)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-12 22:59:09 +08:00
github-actions[bot]
93774f3246 sing-box: update to 1.11.10 (#440)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-05-05 15:40:13 +08:00
29 changed files with 1332 additions and 277 deletions

View File

@@ -0,0 +1,119 @@
#
# Copyright (c) 2025-2026 LWB1978 <https://github.com/lwb1978>
# Description: Auto Cache Software Release JSONs
#
name: Auto Cache Software Release JSONs
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
env:
TZ: Asia/Shanghai
jobs:
cache_json:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Initialization environment
run: |
sudo timedatectl set-timezone "$TZ"
- name: Install GitHub CLI
run: sudo apt-get update && sudo apt-get install -y gh
- name: Fetch GitHub release JSONs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p output old_json
declare -A repos
repos["geoview"]="snowie2000/geoview"
repos["chinadns-ng"]="zfl9/chinadns-ng"
repos["xray"]="XTLS/Xray-core"
repos["sing-box"]="SagerNet/sing-box"
repos["hysteria"]="HyNetwork/hysteria"
echo "Downloading previous api-cache release assets (if exists)..."
gh release download api-cache --dir old_json --pattern "*.json" || echo "No previous release found"
for name in "${!repos[@]}"; do
repo="${repos[$name]}"
echo "Processing $name from $repo ..."
for t in release pre-release; do
old="old_json/${name}-${t}-api.json"
if [ -f "$old" ]; then
cp "$old" "output/${name}-${t}-api.json.bak"
fi
done
curl -sL "https://api.github.com/repos/$repo/releases/latest" -o "output/${name}-release-api.json"
curl -sL "https://api.github.com/repos/$repo/releases?per_page=1" -o "output/${name}-pre-release-api.json"
for t in release pre-release; do
file="output/${name}-${t}-api.json"
TAG_NAME=$(grep -oP '"tag_name": "\K[^"]+' "$file" || true)
if [ -z "$TAG_NAME" ]; then
echo "❌ ${file} No tag_name, restore old files..."
rm -f "$file"
if [ -f "${file}.bak" ]; then
mv "${file}.bak" "$file"
fi
else
echo "✅ ${file} Verification successful, delete bak."
rm -f "${file}.bak"
fi
done
done
- name: Check output directory
id: check_output
run: |
if [ -z "$(ls -A output 2>/dev/null)" ]; then
echo "empty=true" >> $GITHUB_OUTPUT
echo "⚠️ The output directory is empty, and subsequent Upload/Release steps will be skipped."
else
echo "empty=false" >> $GITHUB_OUTPUT
echo "✔ The output directory contains files."
fi
- name: Delete old release and tag
if: steps.check_output.outputs.empty == 'false'
run: |
gh release delete api-cache --cleanup-tag -y || echo "No existing release to delete."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to release
if: steps.check_output.outputs.empty == 'false'
uses: softprops/action-gh-release@v2
with:
tag_name: api-cache
name: Software Release API Cache
files: output/*.json
body: |
This release contains cached GitHub Release API JSON data for several software projects.
It is used by the PassWall (and PassWall2) update component to reduce reliance on GitHub's rate-limited API (60 requests per IP per hour).
**Please do not download it it is of no use to you.**
**请不要下载它,因为它对你没有任何用处。**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 5
delete_workflow_pattern: 'Auto Cache Software Release JSONs'

View File

@@ -22,7 +22,7 @@ env:
jobs:
job_auto_compile:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: test build (${{ matrix.platform }})
strategy:
fail-fast: false
@@ -135,10 +135,17 @@ jobs:
- name: Initialization ${{ matrix.platform }} compile environment
run: |
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /usr/local/lib/android
echo "install packages!!!!!!"
sudo -E apt-get -qq update
sudo -E apt-get -qq install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils python3-setuptools rsync swig unzip zlib1g-dev file wget
sudo -E apt-get -qq install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \
g++-multilib git gnutls-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev \
libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses-dev libpython3-dev \
libreadline-dev libssl-dev libtool libyaml-dev libz-dev lld llvm lrzsz mkisofs msmtp nano \
ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip python3-ply python3-docutils \
python3-pyelftools qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs \
upx-ucl unzip vim wget xmlto xxd zlib1g-dev zstd
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
@@ -156,17 +163,44 @@ jobs:
- name: ${{ matrix.platform }} feeds configuration packages
run: |
cd sdk
echo "src-git base https://github.com/openwrt/openwrt.git;openwrt-${{ matrix.sdk_ver }}" > feeds.conf
echo "src-git packages https://github.com/openwrt/packages.git;openwrt-${{ matrix.sdk_ver }}" >> feeds.conf
echo "src-git luci https://github.com/openwrt/luci.git;openwrt-${{ matrix.sdk_ver }}" >> feeds.conf
echo "src-git routing https://git.openwrt.org/feed/routing.git;openwrt-${{ matrix.sdk_ver }}" >> feeds.conf
echo "src-git passwall_packages https://github.com/${{ env.packages }}.git;main" >> feeds.conf
cat > feeds.conf.default << EOF
src-git passwall_packages https://github.com/${{ env.packages }}.git;main
src-git base https://github.com/openwrt/openwrt.git;openwrt-${{ matrix.sdk_ver }}
src-git packages https://github.com/openwrt/packages.git;openwrt-${{ matrix.sdk_ver }}
src-git luci https://github.com/openwrt/luci.git;openwrt-${{ matrix.sdk_ver }}
src-git routing https://github.com/openwrt/routing.git;openwrt-${{ matrix.sdk_ver }}
src-git telephony https://github.com/openwrt/telephony.git;openwrt-${{ matrix.sdk_ver }}
EOF
./scripts/feeds update -a
./scripts/feeds install -a -f -p passwall_packages
./scripts/feeds install -a
#--------------------------------------begin_patches------------------------------------------
echo "Start applying the patch"
rm -rf temp_resp
git clone -b master --single-branch https://github.com/openwrt/packages.git temp_resp
echo "update golang version"
rm -rf feeds/packages/lang/golang
git clone https://github.com/sbwml/packages_lang_golang -b 24.x feeds/packages/lang/golang
cp -r temp_resp/lang/golang feeds/packages/lang
echo "update rust version"
rm -rf feeds/packages/lang/rust
cp -r temp_resp/lang/rust feeds/packages/lang
rm -rf temp_resp
git clone -b main --single-branch https://github.com/openwrt/openwrt.git temp_resp
cp -f temp_resp/scripts/patch-kernel.sh scripts/
rm -rf temp_resp
echo "fixed rust host build error"
sed -i 's/--set=llvm\.download-ci-llvm=false/--set=llvm.download-ci-llvm=true/' feeds/packages/lang/rust/Makefile
grep -q -- '--ci false \\' feeds/packages/lang/rust/Makefile || sed -i '/x\.py \\/a \ --ci false \\' feeds/packages/lang/rust/Makefile
echo "Patch application completed"
#--------------------------------------end_patches--------------------------------------------
echo "CONFIG_ALL_NONSHARED=n" > .config
echo "CONFIG_ALL_KMODS=n" >> .config

View File

@@ -30,7 +30,7 @@ env:
jobs:
job_init:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
@@ -57,7 +57,7 @@ jobs:
job_auto_update_packages:
if: ${{ always() }}
needs: job_init
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: Auto-update-${{ matrix.pakcages }}
strategy:
fail-fast: false
@@ -212,9 +212,9 @@ jobs:
hash_head: \ HASH:=
version_line:
hash_line: 21
release_api_command: curl -sL "https://api.github.com/repos/v2fly/geoip/releases" | jq -r 'map(select(.prerelease|not)) | first | .tag_name' | sed -e 's/.*v//'
prerelease_api_command: curl -sL "https://api.github.com/repos/v2fly/geoip/releases" | jq -r 'first | .tag_name' | sed -e 's/.*v//'
release_download_url: https://github.com/v2fly/geoip/releases/download/
release_api_command: curl -sL "https://api.github.com/repos/Loyalsoldier/geoip/releases" | jq -r 'map(select(.prerelease|not)) | first | .tag_name' | sed -e 's/.*v//'
prerelease_api_command: curl -sL "https://api.github.com/repos/Loyalsoldier/geoip/releases" | jq -r 'first | .tag_name' | sed -e 's/.*v//'
release_download_url: https://github.com/Loyalsoldier/geoip/releases/download/
file_name: /geoip.dat
- pakcages: v2ray-geosite
@@ -223,10 +223,10 @@ jobs:
hash_head: \ HASH:=
version_line:
hash_line: 30
release_api_command: curl -sL "https://api.github.com/repos/v2fly/domain-list-community/releases" | jq -r 'map(select(.prerelease|not)) | first | .tag_name' | sed -e 's/.*v//'
prerelease_api_command: curl -sL "https://api.github.com/repos/v2fly/domain-list-community/releases" | jq -r 'first | .tag_name' | sed -e 's/.*v//'
release_download_url: https://github.com/v2fly/domain-list-community/releases/download/
file_name: /dlc.dat
release_api_command: curl -sL "https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases" | jq -r 'map(select(.prerelease|not)) | first | .tag_name' | sed -e 's/.*v//'
prerelease_api_command: curl -sL "https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases" | jq -r 'first | .tag_name' | sed -e 's/.*v//'
release_download_url: https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/
file_name: /geosite.dat
# - pakcages: dns2tcp
# folder: dns2tcp
@@ -344,20 +344,35 @@ jobs:
- name: Create Pull Request
id: cpr
if: steps.check.outputs.status == 'success' && steps.check.outputs.New_PKG_VERSION != '' && steps.update.outputs.branch_exists == '' && !cancelled()
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
committer: smallprogram <smallprogram@foxmail.com>
author: smallprogram <smallprogram@foxmail.com>
signoff: false
branch: patches-${{ matrix.pakcages }}-${{ steps.update.outputs.version }}
base: main
delete-branch: true
body: |
${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}
title: "${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
labels: |
automated-pr
draft: false
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
branch="patches-${{ matrix.pakcages }}-${{ steps.update.outputs.version }}"
title="${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
EXISTING=$(gh pr list \
--state open \
--base main \
--json number,title \
--jq ".[] | select(.title == \"$title\") | .number" \
|| echo "")
if [ -n "$EXISTING" ]; then
echo "Duplicate PR with title '$TITLE' already exists: #$EXISTING"
else
git config --global user.email "smallprogram@foxmail.com"
git config --global user.name "smallprogram"
echo "No duplicate found, will create PR."
git checkout -b "$branch"
git add .
git commit -m "${{ matrix.pakcages }}: update to ${{ steps.update.outputs.version }}"
git push origin $branch
gh pr create \
--title "$title" \
--body "$title" \
--base main \
--head "$branch" \
--label "automated-pr"
fi

View File

@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v7.0.0
- uses: actions/stale@v10
with:
stale-issue-message: "Stale Issue"
stale-pr-message: "Stale PR"

View File

@@ -1,64 +1,64 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=chinadns-ng
PKG_VERSION:=2025.03.27
PKG_VERSION:=2025.08.09
PKG_RELEASE:=1
ifeq ($(ARCH),aarch64)
ifeq ($(BOARD),rockchip)
PKG_ARCH:=chinadns-ng+wolfssl@aarch64-linux-musl@generic+v8a@fast+lto
PKG_HASH:=2b3f77f1526da452c1884119dd01176a7964e0d3544b9fc624f67b2a7760613d
PKG_HASH:=3fe0217615dd7060b7287d2b6b31d2a0b364137398bfb335a03bead322eac716
else
PKG_ARCH:=chinadns-ng+wolfssl_noasm@aarch64-linux-musl@generic+v8a@fast+lto
PKG_HASH:=0d6f5f742a3c81f907639b5e1ef2b727870f7aafc67010728e88a7968079b9c0
PKG_HASH:=42ddd494200ec6d88b35902927688d316bc23e06e6c08d9e01eb2412196ab845
endif
else ifeq ($(ARCH),arm)
ifeq ($(CONFIG_arm_v6),y)
PKG_ARCH:=chinadns-ng+wolfssl@arm-linux-musleabi@generic+v6+soft_float@fast+lto
PKG_HASH:=2d972e864a90d1c5e7c874e8ff1f1229fddc03e869c7be9f3b4bf4347a7f150a
PKG_HASH:=0a401d1dc11129481b2baf86f847d55d66bd7e725cba4bf57875fdad27ef0052
else ifeq ($(CONFIG_arm_v7),y)
ifeq ($(CONFIG_HAS_FPU),y)
PKG_ARCH:=chinadns-ng+wolfssl@arm-linux-musleabihf@generic+v7a@fast+lto
PKG_HASH:=77faf3fea926752e2ab54a4d32b3de1c29ada8e075921a0e5bb219285d34d938
PKG_HASH:=dfa1f6ba80fb0925613822f4c4e00df8da68e7b8b772048d26a0d1a9d07d346b
else
PKG_ARCH:=chinadns-ng+wolfssl@arm-linux-musleabi@generic+v6+soft_float@fast+lto
PKG_HASH:=2d972e864a90d1c5e7c874e8ff1f1229fddc03e869c7be9f3b4bf4347a7f150a
PKG_HASH:=0a401d1dc11129481b2baf86f847d55d66bd7e725cba4bf57875fdad27ef0052
endif
else
PKG_ARCH:=chinadns-ng+wolfssl@arm-linux-musleabi@generic+v5te+soft_float@fast+lto
PKG_HASH:=7414c31064f36fe3357e9bd14e537a23b38174c8d2de76c60869cb51085afd99
PKG_HASH:=dc104953fcd95c1c98b7b2b54b0b6731565e0650f81230e6de127a486803f42f
endif
else ifeq ($(ARCH),mips)
PKG_ARCH:=chinadns-ng+wolfssl@mips-linux-musl@mips32+soft_float@fast+lto
PKG_HASH:=b8ae32305069cccf01ef2704633ab326d69bd8ef7cfb71a30722d71e9cd6787e
PKG_HASH:=b610821a8f61b0ed3c8c7e82e10d401348a9de17f900988589024a37c4099c8e
else ifeq ($(ARCH),mipsel)
ifeq ($(CONFIG_HAS_FPU),)
PKG_ARCH:=chinadns-ng+wolfssl@mipsel-linux-musl@mips32+soft_float@fast+lto
PKG_HASH:=f12ce9b5227fefbf82401bd22379a52f2ec157c7cbe7e7dbdd2c0b2599e3a323
PKG_HASH:=760544a88724e3b1b9eac79c9400231e81aa8786f8f00a979229e175811ffe6d
else
PKG_ARCH:=chinadns-ng+wolfssl@mipsel-linux-musl@mips32@fast+lto
PKG_HASH:=7cf942d7fac3cf1f86295ee1af8a724065c6ab6595ca084cbd9f5ecc34e32483
PKG_HASH:=ec547c31a884e0967437ceb90a5c270864efe81b0e40939e0ec2810c7bfd6653
endif
else ifeq ($(ARCH),mips64)
PKG_ARCH:=chinadns-ng+wolfssl@mips64-linux-musl@mips64+soft_float@fast+lto
PKG_HASH:=658d2f46caad44ba731193380b06faaeaa82501766584a6208ec4ff54d9b16e5
PKG_HASH:=2d0fce18a7ef1d74fdc12738767e66998a52c2b30d8790da760933853fe8726e
else ifeq ($(ARCH),mips64el)
PKG_ARCH:=chinadns-ng+wolfssl@mips64el-linux-musl@mips64+soft_float@fast+lto
PKG_HASH:=f2f5617e0348ef621e2cb41ed6c56d6911ae5d21e68cc9063b69ce99c1f54938
PKG_HASH:=a301d8d200d06582c60bbe0e487a28f5b41e6f0997a548cf882a7b078dab089c
else ifeq ($(ARCH),i386)
ifneq ($(CONFIG_TARGET_x86_geode)$(CONFIG_TARGET_x86_legacy),)
PKG_ARCH:=chinadns-ng+wolfssl@i386-linux-musl@i686@fast+lto
PKG_HASH:=d9d0c3c38ca5b3ac266ae5753a0d87b37f571a6e2a8806699f858ad348afbf5e
PKG_HASH:=85e057dd0a0e8913b30471737436ab8b71834c494ed9f9e53544261b1ffdc8d6
else
PKG_ARCH:=chinadns-ng+wolfssl@i386-linux-musl@pentium4@fast+lto
PKG_HASH:=dd54f258239f9b868c67ec4e18de074706f8b852796bfd61178f2cd145d17ff6
PKG_HASH:=2d0f1a05c82f2e21e71a6618c7f1d2e7f46aa6a21535d774d517e87ec00c989b
endif
else ifeq ($(ARCH),x86_64)
PKG_ARCH:=chinadns-ng+wolfssl@x86_64-linux-musl@x86_64@fast+lto
PKG_HASH:=37b337f1006b85176840f1b82508731a292751d1ee94bb3791578d04d63f856f
PKG_HASH:=842ea4e9816efd91d39bc76ead5c4a42e79011757e37c521b4270b675cfcb30c
else ifeq ($(ARCH),riscv64)
PKG_ARCH:=chinadns-ng+wolfssl@riscv64-linux-musl@baseline_rv64@fast+lto
PKG_HASH:=8bf3e88c78f537595651cb1ad40196c36d4bf5c1796ff70990523784409f8155
PKG_HASH:=7056f47f4d6b20109e007792694dc83e5eac44c9265d7be20f6dc10375b35a9b
else
PKG_HASH:=dummy
endif
@@ -79,7 +79,7 @@ define Package/chinadns-ng
SUBMENU:=IP Addresses and Names
TITLE:=ChinaDNS next generation, refactoring with epoll and ipset.
URL:=https://github.com/zfl9/chinadns-ng
DEPENDS:=@(aarch64||arm||i386||mips||mipsel||mips64||mips64el||x86_64||riscv64) +ipset
DEPENDS:=@(aarch64||arm||i386||mips||mipsel||mips64||mips64el||x86_64||riscv64)
endef
define Build/Compile

View File

@@ -8,8 +8,8 @@ PKG_NAME:=dns2socks
PKG_VERSION:=2.1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
PKG_SOURCE_URL:=@SF/dns2socks/SourceCode.zip?
PKG_SOURCE:=SourceCode.zip
PKG_SOURCE_URL:=https://github.com/xiaorouji/openwrt-passwall-packages/releases/download/dns2socks
PKG_SOURCE_DATE:=2020-02-18
PKG_HASH:=406b5003523577d39da66767adfe54f7af9b701374363729386f32f6a3a995f4

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=geoview
PKG_VERSION:=0.1.9
PKG_VERSION:=0.2.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/snowie2000/geoview/tar.gz/$(PKG_VERSION)?
PKG_HASH:=c071983826e34b22b0d1383e4e778eb28a232dc5b3f9e5d5dd5247972be5ca95
PKG_HASH:=3cdec7da60d5ec84f71e086fdc77f43287d064371f51d49bcfe09abd50604343
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hysteria
PKG_VERSION:=2.6.1
PKG_VERSION:=2.6.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/apernet/hysteria/tar.gz/app/v$(PKG_VERSION)?
PKG_HASH:=21955752d4a9fcbe42cde9e491421b67144e0070cba184884ad7f8d4ff1f48de
PKG_HASH:=21a04ef8ce640d7c60c3b8678500b6e6481862d9af62f9ce2663b772211718d0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-app-v$(PKG_VERSION)
PKG_LICENSE:=MIT

View File

@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=microsocks
PKG_VERSION:=1.0.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)?
@@ -25,7 +25,7 @@ define Package/microsocks
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=Tiny, portable SOCKS5 server
TITLE:=Tiny, portable SOCKS5 server. Support forwarding rules
URL:=https://github.com/rofl0r/microsocks
DEPENDS:=+libpthread
endef
@@ -33,6 +33,7 @@ endef
define Package/microsocks/description
A SOCKS5 service that you can run on your remote boxes to tunnel connections
through them, if for some reason SSH doesn't cut it for you.
This version supports forwarding rules.
endef
define Package/microsocks/install

View File

@@ -0,0 +1,428 @@
--- a/sockssrv.c
+++ b/sockssrv.c
@@ -33,8 +33,10 @@
#include <arpa/inet.h>
#include <errno.h>
#include <limits.h>
+#include <sys/time.h>
#include "server.h"
#include "sblist.h"
+#define MICROSOCKS_VERSION "1.0.5-forward"
/* timeout in microseconds on resource exhaustion to prevent excessive
cpu usage. */
@@ -71,6 +73,7 @@
static pthread_rwlock_t auth_ips_lock = PTHREAD_RWLOCK_INITIALIZER;
static const struct server* server;
static union sockaddr_union bind_addr = {.v4.sin_family = AF_UNSPEC};
+static sblist *fwd_rules;
enum socksstate {
SS_1_CONNECTED,
@@ -97,6 +100,17 @@
EC_ADDRESSTYPE_NOT_SUPPORTED = 8,
};
+struct fwd_rule {
+ char *match_name;
+ short match_port;
+ char *auth_buf; /* Username/Password request buffer (RFC-1929) */
+ size_t auth_len;
+ char *upstream_name;
+ short upstream_port;
+ char *req_buf; /* Client Connection Request buffer to send to upstream */
+ size_t req_len;
+};
+
struct thread {
pthread_t pt;
struct client client;
@@ -116,6 +130,109 @@
static void dolog(const char* fmt, ...) { }
#endif
+static int upstream_handshake(const struct fwd_rule* rule, unsigned char *client_buf, size_t client_buf_len,
+ int client_fd, int upstream_fd, unsigned short client_port) {
+ unsigned char sbuf[512];
+ ssize_t r;
+
+ if(rule->auth_buf) {
+ unsigned char handshake[4] = {5, 2, 0, 2};
+ if (write(upstream_fd, handshake, 4) != 4) {
+ close(upstream_fd);
+ return -1;
+ }
+ } else {
+ unsigned char handshake[3] = {5, 1, 0};
+ if (write(upstream_fd, handshake, 3) != 3) {
+ close(upstream_fd);
+ return -1;
+ }
+ }
+
+ if (read(upstream_fd, sbuf, 2) != 2 || sbuf[0] != 5) {
+ close(upstream_fd);
+ return -1;
+ }
+
+ if (sbuf[1] == 2) {
+ if (!rule->auth_buf) {
+ close(upstream_fd);
+ return -1;
+ }
+ if (write(upstream_fd, rule->auth_buf, rule->auth_len) != (ssize_t)rule->auth_len) {
+ close(upstream_fd);
+ return -1;
+ }
+ if (read(upstream_fd, sbuf, 2) != 2 || sbuf[0] != 1 || sbuf[1] != 0) {
+ close(upstream_fd);
+ return -1;
+ }
+ } else if (sbuf[1] != 0) {
+ close(upstream_fd);
+ return -1;
+ }
+
+ if (write(upstream_fd, client_buf, client_buf_len) != (ssize_t)client_buf_len) {
+ close(upstream_fd);
+ return -1;
+ }
+
+ size_t total = 0;
+ size_t need = 4;
+
+ while (total < need) {
+ r = read(upstream_fd, sbuf + total, need - total);
+ if (r <= 0) {
+ close(upstream_fd);
+ return -1;
+ }
+ total += r;
+ }
+
+ if (sbuf[1] != 0) {
+ close(upstream_fd);
+ return -sbuf[1];
+ }
+
+ size_t need_more = 0;
+ switch (sbuf[3]) {
+ case 1:
+ need_more = 4 + 2;
+ break;
+ case 4:
+ need_more = 16 + 2;
+ break;
+ case 3:
+ r = read(upstream_fd, sbuf + total, 1);
+ if (r != 1) {
+ close(upstream_fd);
+ return -1;
+ }
+ total += r;
+ need_more = sbuf[4] + 2;
+ break;
+ default:
+ close(upstream_fd);
+ return -EC_ADDRESSTYPE_NOT_SUPPORTED;
+ }
+
+ while (total < need + need_more) {
+ r = read(upstream_fd, sbuf + total, (need + need_more) - total);
+ if (r <= 0) {
+ close(upstream_fd);
+ return -1;
+ }
+ total += r;
+ }
+
+ if (write(client_fd, sbuf, total) != (ssize_t)total) {
+ close(upstream_fd);
+ return -1;
+ }
+
+ return upstream_fd;
+}
+
static struct addrinfo* addr_choose(struct addrinfo* list, union sockaddr_union* bindaddr) {
int af = SOCKADDR_UNION_AF(bindaddr);
if(af == AF_UNSPEC) return list;
@@ -125,7 +242,9 @@
return list;
}
-static int connect_socks_target(unsigned char *buf, size_t n, struct client *client) {
+static int connect_socks_target(unsigned char *buf, size_t n, struct client *client, int *used_rule) {
+ *used_rule = 0;
+
if(n < 5) return -EC_GENERAL_FAILURE;
if(buf[0] != 5) return -EC_GENERAL_FAILURE;
if(buf[1] != 1) return -EC_COMMAND_NOT_SUPPORTED; /* we support only CONNECT method */
@@ -158,6 +277,29 @@
}
unsigned short port;
port = (buf[minlen-2] << 8) | buf[minlen-1];
+
+ size_t i;
+ struct fwd_rule *rule = NULL;
+ char original_name[256];
+ unsigned short original_port = port;
+ strncpy(original_name, namebuf, sizeof(original_name) - 1);
+ original_name[sizeof(original_name) - 1] = '\0';
+ if(fwd_rules) {
+ for(i=0;i<sblist_getsize(fwd_rules);++i) {
+ struct fwd_rule* r = (struct fwd_rule*)sblist_get(fwd_rules, i);
+ int name_match = (r->match_name[0]=='\0' || strcmp(r->match_name, namebuf) == 0);
+ int port_match = (r->match_port == 0 || r->match_port == port);
+ if(name_match && port_match) {
+ rule = r;
+ *used_rule = 1;
+ strncpy(namebuf, r->upstream_name, sizeof(namebuf)-1);
+ namebuf[sizeof(namebuf)-1] = '\0';
+ port = r->upstream_port;
+ break;
+ }
+ }
+ }
+
/* there's no suitable errorcode in rfc1928 for dns lookup failure */
if(resolve(namebuf, port, &remote)) return -EC_GENERAL_FAILURE;
struct addrinfo* raddr = addr_choose(remote, &bind_addr);
@@ -186,6 +328,11 @@
return -EC_GENERAL_FAILURE;
}
}
+
+ struct timeval tv = {5, 0};
+ setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof(tv));
+ setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (const char*)&tv, sizeof(tv));
+
if(SOCKADDR_UNION_AF(&bind_addr) == raddr->ai_family &&
bindtoip(fd, &bind_addr) == -1)
goto eval_errno;
@@ -198,9 +345,22 @@
af = SOCKADDR_UNION_AF(&client->addr);
void *ipdata = SOCKADDR_UNION_ADDRESS(&client->addr);
inet_ntop(af, ipdata, clientname, sizeof clientname);
- dolog("client[%d] %s: connected to %s:%d\n", client->fd, clientname, namebuf, port);
+ if (rule) {
+ dolog("client[%d] %s: %s:%d -> via %s:%d\n", client->fd, clientname, original_name, original_port, rule->upstream_name, rule->upstream_port);
+ } else {
+ dolog("client[%d] %s: connected to %s:%d\n", client->fd, clientname, namebuf, port);
+ }
}
- return fd;
+
+ if (rule) {
+ int result = upstream_handshake(rule, buf, n, client->fd, fd, original_port);
+ if (result < 0) {
+ close(fd);
+ return result;
+ }
+ return result;
+ }
+ return fd;
}
static int is_authed(union sockaddr_union *client, union sockaddr_union *authedip) {
@@ -322,6 +482,7 @@
ssize_t n;
int ret;
enum authmethod am;
+ int used_rule = 0;
t->state = SS_1_CONNECTED;
while((n = recv(t->client.fd, buf, sizeof buf, 0)) > 0) {
switch(t->state) {
@@ -345,12 +506,14 @@
}
break;
case SS_3_AUTHED:
- ret = connect_socks_target(buf, n, &t->client);
+ ret = connect_socks_target(buf, n, &t->client, &used_rule);
if(ret < 0) {
send_error(t->client.fd, ret*-1);
return -1;
}
- send_error(t->client.fd, EC_SUCCESS);
+ if (!used_rule) {
+ send_error(t->client.fd, EC_SUCCESS);
+ }
return ret;
}
}
@@ -382,11 +545,131 @@
}
}
+static short host_get_port(char *name) {
+ int p,n;
+ char *c;
+ if((c = strrchr(name, ':')) && sscanf(c+1,"%d%n",&p, &n)==1 && n == (int)(strlen(c + 1)) && p >= 0 && p < USHRT_MAX)
+ return (*c='\0'),(short)p;
+ else
+ return -1;
+}
+
+static int fwd_rules_add(char *str) {
+ char *match = NULL, *upstream = NULL, *remote = NULL;
+ unsigned short match_port, upstream_port, remote_port;
+ int ncred;
+
+ if(sscanf(str, "%m[^,],%n%m[^,],%ms\n", &match, &ncred, &upstream, &remote) != 3)
+ return 1;
+
+ match_port = host_get_port(match);
+ upstream_port = host_get_port(upstream);
+ remote_port = host_get_port(remote);
+
+ if(match_port < 0 || upstream_port <= 0 || remote_port < 0) {
+ free(match);
+ free(upstream);
+ free(remote);
+ return 1;
+ }
+
+ char *match_copy = strdup(match);
+ char *upstream_copy = strdup(upstream);
+ char *remote_copy = strdup(remote);
+
+ struct fwd_rule *rule = (struct fwd_rule*)malloc(sizeof(struct fwd_rule));
+ if (!rule) {
+ free(match_copy);
+ free(upstream_copy);
+ free(remote_copy);
+ free(match);
+ free(upstream);
+ free(remote);
+ return 1;
+ }
+
+ if(strcmp(match_copy, "0.0.0.0") == 0 || strcmp(match_copy, "*") == 0) {
+ free(match_copy);
+ rule->match_name = strdup("");
+ } else {
+ rule->match_name = match_copy;
+ }
+ rule->match_port = match_port;
+ rule->auth_buf = NULL;
+ rule->auth_len = 0;
+
+ char *at_sign = strchr(upstream_copy, '@');
+ if (at_sign) {
+ *at_sign = '\0';
+ char *auth_part = upstream_copy;
+ char *host_part = at_sign + 1;
+ char *colon = strchr(auth_part, ':');
+ if (!colon) {
+ free(rule);
+ free(upstream_copy);
+ free(remote_copy);
+ free(match);
+ free(upstream);
+ free(remote);
+ return 1;
+ }
+ *colon++ = '\0';
+ char *username = auth_part;
+ char *password = colon;
+ size_t ulen = strlen(username);
+ size_t plen = strlen(password);
+ if (ulen > 255 || plen > 255) {
+ free(rule);
+ free(upstream_copy);
+ free(remote_copy);
+ free(match);
+ free(upstream);
+ free(remote);
+ return 1;
+ }
+ rule->auth_len = 1 + 1 + ulen + 1 + plen;
+ rule->auth_buf = malloc(rule->auth_len);
+ rule->auth_buf[0] = 1;
+ rule->auth_buf[1] = ulen;
+ memcpy(&rule->auth_buf[2], username, ulen);
+ rule->auth_buf[2 + ulen] = plen;
+ memcpy(&rule->auth_buf[3 + ulen], password, plen);
+ rule->upstream_name = strdup(host_part);
+ rule->upstream_port = upstream_port;
+ /* hide from ps */
+ memset(str+ncred, '*', ulen+1+plen);
+ } else {
+ rule->upstream_name = strdup(upstream_copy);
+ rule->upstream_port = upstream_port;
+ }
+
+ free(upstream_copy);
+ short rlen = strlen(remote_copy);
+ rule->req_len = 3 + 1 + 1 + rlen + 2;
+ rule->req_buf = (char*)malloc(rule->req_len);
+ rule->req_buf[0] = 5;
+ rule->req_buf[1] = 1;
+ rule->req_buf[2] = 0;
+ rule->req_buf[3] = 3;
+ rule->req_buf[4] = rlen;
+ memcpy(&rule->req_buf[5], remote_copy, rlen);
+ unsigned short rport = remote_port ? remote_port : 0;
+ rule->req_buf[5 + rlen] = (rport >> 8) & 0xFF;
+ rule->req_buf[5 + rlen + 1] = (rport & 0xFF);
+ free(remote_copy);
+ sblist_add(fwd_rules, rule);
+ free(match);
+ free(upstream);
+ free(remote);
+
+ return 0;
+}
+
static int usage(void) {
dprintf(2,
"MicroSocks SOCKS5 Server\n"
"------------------------\n"
- "usage: microsocks -1 -q -i listenip -p port -u user -P pass -b bindaddr -w ips\n"
+ "usage: microsocks -1 -q -i listenip -p port -u user -P pass -b bindaddr -w ips -f fwdrule\n"
"all arguments are optional.\n"
"by default listenip is 0.0.0.0 and port 1080.\n\n"
"option -q disables logging.\n"
@@ -401,6 +684,12 @@
" this is handy for programs like firefox that don't support\n"
" user/pass auth. for it to work you'd basically make one connection\n"
" with another program that supports it, and then you can use firefox too.\n"
+ "option -f specifies a forwarding rule of the form\n"
+ " match_name:match_port,[user:password@]upstream_name:upstream_port,remote_name:remote_port\n"
+ " this will cause requests that /match/ to be renamed to /remote/\n"
+ " and sent to the /upstream/ SOCKS5 proxy server.\n"
+ " this option may be specified multiple times.\n"
+ "option -V prints version information and exits.\n"
);
return 1;
}
@@ -416,7 +705,7 @@
const char *listenip = "0.0.0.0";
char *p, *q;
unsigned port = 1080;
- while((ch = getopt(argc, argv, ":1qb:i:p:u:P:w:")) != -1) {
+ while((ch = getopt(argc, argv, ":1qb:i:p:u:P:w:f:V")) != -1) {
switch(ch) {
case 'w': /* fall-through */
case '1':
@@ -456,11 +745,20 @@
case 'p':
port = atoi(optarg);
break;
+ case 'f':
+ if(!fwd_rules)
+ fwd_rules = sblist_new(sizeof(struct fwd_rule), 16);
+ if(fwd_rules_add(optarg))
+ return dprintf(2, "error: could not parse forwarding rule %s\n", optarg), 1;
+ break;
case ':':
dprintf(2, "error: option -%c requires an operand\n", optopt);
/* fall through */
case '?':
return usage();
+ case 'V':
+ dprintf(1, "MicroSocks %s\n", MICROSOCKS_VERSION);
+ return 0;
}
}
if((auth_user && !auth_pass) || (!auth_user && auth_pass)) {

View File

@@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=naiveproxy
PKG_VERSION:=136.0.7103.44
PKG_RELEASE:=1
PKG_VERSION:=143.0.7499.109
PKG_RELEASE:=2
ARCH_PREBUILT:=$(ARCH_PACKAGES)
@@ -25,47 +25,47 @@ PKG_SOURCE:=naiveproxy-v$(PKG_VERSION)-$(PKG_RELEASE)-openwrt-$(ARCH_PREBUILT).t
PKG_SOURCE_URL:=https://github.com/klzgrad/naiveproxy/releases/download/v$(PKG_VERSION)-$(PKG_RELEASE)/
ifeq ($(ARCH_PREBUILT),aarch64_cortex-a53)
PKG_HASH:=639e748f39380bbb146b437c2c8844d0ba73157bd0bb6570656effbf0573b2d5
PKG_HASH:=e5eec05d7e799c4b6f93adb02129246142a88e427d76d6275a0312872031a1db
else ifeq ($(ARCH_PREBUILT),aarch64_cortex-a72)
PKG_HASH:=8c27f966bd9b98f68e594b0c876fc3cb08a4bd46d0c6c796b98765cd3d52456a
PKG_HASH:=ca7975f7b711d1936d44b7a3676d4ddec59dd84339da0e28aa8bbc1fa738523a
else ifeq ($(ARCH_PREBUILT),aarch64_generic)
PKG_HASH:=fa2608512e2ccdb532474de847daa9519e100274ecb5e0b8a28702f04e322306
PKG_HASH:=a4b34126901ad577a018332dd8cfa015ca5de1dcbbcf445465fb5a89a29a6b29
else ifeq ($(ARCH_PREBUILT),arm_arm1176jzf-s_vfp)
PKG_HASH:=8630dd33bdaa7c3b70f83e709f99a8dff223ce44cd259c6b74c1937117c9adf3
PKG_HASH:=ec0a9a76bc51d7608897db9d87c3e52a889989856b3456cf1b35c4a42891fc40
else ifeq ($(ARCH_PREBUILT),arm_arm926ej-s)
PKG_HASH:=9fc02031a8bca7352f68bd7375e56c8e2149fdd1cd7f77534a86be8cd40532bf
PKG_HASH:=bdd03cdec1f7215369cafdc7922f3d78ecd570a59d5cd04e829cab33c6dbc68e
else ifeq ($(ARCH_PREBUILT),arm_cortex-a15_neon-vfpv4)
PKG_HASH:=392a4c05e22cfa5bf13d70675b0f1fa3d977f1396192aa626baad998089d5097
PKG_HASH:=fce86759321a06cc373ceef1a38fee456cf0383cc466a3762671b9a0fc4e13ba
else ifeq ($(ARCH_PREBUILT),arm_cortex-a5_vfpv4)
PKG_HASH:=0302503e6270ec48427f13816b6608eb80241598256692a2911c9f52057153ca
PKG_HASH:=3bb0eef45955ccb656c0b074db40024e35a96c0588250534d25468242b21e067
else ifeq ($(ARCH_PREBUILT),arm_cortex-a7)
PKG_HASH:=2b1d569eb8f47ad6499d8f26b15fede9257c69e447dc8ad3a36954dbc131f0a4
PKG_HASH:=42c95ce44d9abb1472f4817b5839252fc418cecd3b1d683a0211ca98e7e9a21f
else ifeq ($(ARCH_PREBUILT),arm_cortex-a7_neon-vfpv4)
PKG_HASH:=3822c2f6ffbbdeacb6182d4e24cd2551f2cf30a31f9f38d6c059833772ee1fd6
PKG_HASH:=7222d40cc5b0f29e5858e6023e713cc69174672b2489a8c8525d031822b38230
else ifeq ($(ARCH_PREBUILT),arm_cortex-a7_vfpv4)
PKG_HASH:=3b734e692a6ae2b17e53a10775bb3f23a89b15724b745b7b0d78f738f5cab9b4
PKG_HASH:=1c15ceeb689d686e198afd0c1bb72b6c54ef89bde5b347205d6c2cedf359f37a
else ifeq ($(ARCH_PREBUILT),arm_cortex-a8_vfpv3)
PKG_HASH:=e90eeb26167f1f0360d2c94ca1116ff24a66875fa83105cadaa2665a2aa7d346
PKG_HASH:=a5f370df608aba401cb5a761c17f994d27d1a912be1aa9c7bcc0417314ecfb62
else ifeq ($(ARCH_PREBUILT),arm_cortex-a9)
PKG_HASH:=2ceb7baeec30fee26b15b76ad6e40922934509a6f03598ecdd53e6080e87172d
PKG_HASH:=f5df82bd5d3a45e8869026977c2d30bac6ccc258dadb7046e3306d4e54395741
else ifeq ($(ARCH_PREBUILT),arm_cortex-a9_neon)
PKG_HASH:=c2605ba10c7631c9ada9231de2af5ed23850b04b244003b96462b71959fc908a
PKG_HASH:=7600df27693dda5f43c7d38715b9d4664db77ed4488c77da822c690cb28fcf90
else ifeq ($(ARCH_PREBUILT),arm_cortex-a9_vfpv3-d16)
PKG_HASH:=65dae408d2c56accd6e5ddb99df104df792d87a92b0d55f36ed2596ccbdfd8c9
PKG_HASH:=c010124d705e19da53e0df4658c23a5ad0ff71e89f8819e01f9e7011160042fa
else ifeq ($(ARCH_PREBUILT),arm_mpcore)
PKG_HASH:=b4b9073edda26281b6913834f04802beb40308bc06237091de38649c74295c22
PKG_HASH:=6ccbf7cf6b17b4cf4ab7b29b12a279b1fc79257f2fc569e81a5af6bda18819f4
else ifeq ($(ARCH_PREBUILT),arm_xscale)
PKG_HASH:=cb051087fa4f3b58546d5c746349190163eff80635a0a1ab9ffc17b9c867129f
PKG_HASH:=5367433f1759aa0b947f6180c9d1944205629d7829db9f3466bd38d40da57ae0
else ifeq ($(ARCH_PREBUILT),mipsel_24kc)
PKG_HASH:=f01eb9a10300ac6f7d5cd9759a9a47980a9c9c8c5868e25b705c63e711706032
PKG_HASH:=444a59288e3e7e80b2ca04fb4d6fb9a046a624cb01a9cea2314834c736561433
else ifeq ($(ARCH_PREBUILT),mipsel_mips32)
PKG_HASH:=cf4c5f8eafba8420dbdc624b228f48f4cc9089c1cec14bb7178e44709896a798
PKG_HASH:=fa568b8a8ed8505a99d5ca30568cbdb2539cc48d218c338a321fba116632daa1
else ifeq ($(ARCH_PREBUILT),riscv64)
PKG_HASH:=0b755b2613e2a66b3ca5d6db20b9207a60cd0ac45fd166df6aa6a2d13acc24cb
PKG_HASH:=13c1a43e58cef7219baf828250afb9390fd2ed9379d30f7d7b182db61492fe69
else ifeq ($(ARCH_PREBUILT),x86)
PKG_HASH:=7e90b9c94751c17c674a5da0a7cfd7ab28bc6657e5a698e3f7e60ec6d3ae2858
PKG_HASH:=8088dd1ea80321109248f68f6f1a7c45f5b4dc0982992aabde725c3503a5b442
else ifeq ($(ARCH_PREBUILT),x86_64)
PKG_HASH:=bfb9d0b7f7f48e7ab6cbcf8389e2b239c68ad608331bd03b0ab68ddf0ebff019
PKG_HASH:=5681e13c833757cfb5769755fd93d1906c47448af190585067bde9de590bdb2e
else
PKG_HASH:=dummy
endif

View File

@@ -1,34 +1,28 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2021 ImmortalWrt
. /lib/functions.sh
. /lib/functions/procd.sh
USE_PROCD=1
START=99
STOP=10
init_conf() {
config_load "naiveproxy"
config_get "enable" "config" "enable" "0"
NAME="naiveproxy"
start_service() {
config_load "$NAME"
config_get_bool "enable" "config" "enable" "0"
[ "$enable" -eq "1" ] || return 1
config_get "listen_addr" "config" "listen_addr"
config_get "server_addr" "config" "server_addr"
config_get "extra_argument" "config" "extra_argument"
}
start_service() {
init_conf
[ "${enable}" == "1" ] || return 0
procd_open_instance naiveproxy
procd_set_param command naive
procd_append_param command --listen="${listen_addr}"
procd_append_param command --proxy="${server_addr}"
[ -n "${extra_argument}" ] && procd_append_param command "${extra_argument}"
procd_append_param command --listen="$listen_addr"
procd_append_param command --proxy="$server_addr"
[ -n "$extra_argument" ] && procd_append_param command $extra_argument
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
procd_set_param respawn
procd_set_param limits core="unlimited"
procd_set_param stdout 1
procd_set_param stderr 1
@@ -36,12 +30,6 @@ start_service() {
procd_close_instance
}
reload_service()
{
stop
start
}
service_triggers() {
procd_add_reload_trigger "naiveproxy"
procd_add_reload_trigger "$NAME"
}

43
shadow-tls/Makefile Normal file
View File

@@ -0,0 +1,43 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2025 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=shadow-tls
PKG_VERSION:=0.2.25
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ihciah/shadow-tls/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=1d1d436734823ba0302de6e91883ed892ea710769c722a139990194ff5837224
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=rust/host
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/rust/rust-package.mk
define Package/shadow-tls
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=A proxy to expose real tls handshake to the firewall
URL:=https://github.com/ihciah/shadow-tls
DEPENDS:=@(aarch64||arm||x86_64)
endef
define Package/shadow-tls/description
A proxy to expose real tls handshake to the firewall.
It works like trojan but it does not require signing certificate.
The firewall will see real tls handshake with valid certificate
that you choose.
endef
$(eval $(call RustBinPackage,shadow-tls))
$(eval $(call BuildPackage,shadow-tls))

View File

@@ -0,0 +1,23 @@
From 045014130570dd23d5a9cce124b78b2bb1ddaf5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E1=A1=A0=E1=A0=B5=E1=A1=A0=E1=A1=B3=20=E1=A1=A0=E1=A0=B5?=
=?UTF-8?q?=E1=A1=A0=20=E1=A0=AE=E1=A0=A0=E1=A0=A8=E1=A1=A9=E1=A0=8B?=
=?UTF-8?q?=E1=A0=A0=E1=A0=A8?=
<125150101+UjuiUjuMandan@users.noreply.github.com>
Date: Thu, 24 Apr 2025 22:39:07 +0000
Subject: [PATCH] Fix reading WildcardSNI from sip003_arg (#115)
---
src/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/main.rs
+++ b/src/main.rs
@@ -269,7 +269,7 @@ pub(crate) fn get_sip003_arg() -> Option
let tls_addrs = parse_server_addrs(tls_addr)
.expect("tls param parse failed(like tls=xxx.com:443 or tls=yyy.com:1.2.3.4:443;zzz.com:443;xxx.com)");
let wildcard_sni =
- WildcardSNI::from_str(opts.get("tls").map(AsRef::as_ref).unwrap_or_default(), true)
+ WildcardSNI::from_str(opts.get("wildcard-sni").map(AsRef::as_ref).unwrap_or("off"), true)
.expect("wildcard_sni format error");
Args {
cmd: crate::Commands::Server {

View File

@@ -0,0 +1,230 @@
From 02dd0bc7bae8a2011729f95021690e694fd8e43e Mon Sep 17 00:00:00 2001
From: V <vendettareborn@proton.me>
Date: Fri, 25 Apr 2025 18:27:13 +0200
Subject: [PATCH] fix: use tls1.2 only website for tls12 test suites (#129)
* fix: use tls1.2 only website for tls12 test suites
---
src/helper_v2.rs | 2 ++
src/main.rs | 12 +++++++-----
src/sip003.rs | 6 +++---
src/util.rs | 2 +-
tests/tls12.rs | 32 ++++++++++++++++----------------
5 files changed, 29 insertions(+), 25 deletions(-)
--- a/src/helper_v2.rs
+++ b/src/helper_v2.rs
@@ -26,6 +26,7 @@ use crate::util::prelude::*;
pub(crate) const HMAC_SIZE_V2: usize = 8;
+#[allow(unused)]
pub(crate) trait HashedStream {
fn hash_stream(&self) -> [u8; 20];
}
@@ -98,6 +99,7 @@ impl<S> HashedWriteStream<S> {
})
}
+ #[allow(unused)]
pub(crate) fn hash(&self) -> [u8; 20] {
self.hmac
.borrow()
--- a/src/main.rs
+++ b/src/main.rs
@@ -252,7 +252,7 @@ pub(crate) fn get_sip003_arg() -> Option
let opts: HashMap<_, _> = opts.into_iter().collect();
let threads = opts.get("threads").map(|s| s.parse::<u8>().unwrap());
- let v3 = opts.get("v3").is_some();
+ let v3 = opts.contains_key("v3");
let passwd = opts
.get("passwd")
.expect("need passwd param(like passwd=123456)");
@@ -262,15 +262,17 @@ pub(crate) fn get_sip003_arg() -> Option
v3,
..Default::default()
};
- let args = if opts.get("server").is_some() {
+ let args = if opts.contains_key("server") {
let tls_addr = opts
.get("tls")
.expect("tls param must be specified(like tls=xxx.com:443)");
let tls_addrs = parse_server_addrs(tls_addr)
.expect("tls param parse failed(like tls=xxx.com:443 or tls=yyy.com:1.2.3.4:443;zzz.com:443;xxx.com)");
- let wildcard_sni =
- WildcardSNI::from_str(opts.get("wildcard-sni").map(AsRef::as_ref).unwrap_or("off"), true)
- .expect("wildcard_sni format error");
+ let wildcard_sni = WildcardSNI::from_str(
+ opts.get("wildcard-sni").map(AsRef::as_ref).unwrap_or("off"),
+ true,
+ )
+ .expect("wildcard_sni format error");
Args {
cmd: crate::Commands::Server {
listen: format!("{ss_remote_host}:{ss_remote_port}"),
--- a/src/sip003.rs
+++ b/src/sip003.rs
@@ -6,7 +6,7 @@ pub fn parse_sip003_options(s: &str) ->
let mut i = 0;
while i < s.len() {
// read key
- let (offset, key) = index_unescaped(&s[i..], &[b'=', b';']).context("read key")?;
+ let (offset, key) = index_unescaped(&s[i..], b"=;").context("read key")?;
if key.is_empty() {
bail!("empty key in {}", &s[i..]);
}
@@ -21,7 +21,7 @@ pub fn parse_sip003_options(s: &str) ->
// skip equals
i += 1;
// read value
- let (offset, value) = index_unescaped(&s[i..], &[b'=', b';']).context("read value")?;
+ let (offset, value) = index_unescaped(&s[i..], b"=;").context("read value")?;
i += offset;
opts.push((key, value));
// Skip the semicolon.
@@ -36,7 +36,7 @@ fn index_unescaped(s: &str, term: &[u8])
while i < s.len() {
let mut b: u8 = s.as_bytes()[i];
- if term.iter().any(|&e| b == e) {
+ if term.contains(&b) {
break;
}
if b == b'\\' {
--- a/src/util.rs
+++ b/src/util.rs
@@ -599,7 +599,7 @@ pub(crate) async fn resolve(addr: &str)
addr_iter.next().ok_or_else(|| {
std::io::Error::new(
std::io::ErrorKind::InvalidInput,
- format!("unable to resolve addr: {}", addr),
+ format!("unable to resolve addr: {addr}"),
)
})
}
--- a/tests/tls12.rs
+++ b/tests/tls12.rs
@@ -4,7 +4,7 @@ use shadow_tls::{RunningArgs, TlsAddrs,
mod utils;
use utils::*;
-// handshake: bing.com(tls1.2 only)
+// handshake: badssl.com(tls1.2 only)
// data: captive.apple.com:80
// protocol: v2
#[test]
@@ -12,7 +12,7 @@ fn tls12_v2() {
let client = RunningArgs::Client {
listen_addr: "127.0.0.1:30000".to_string(),
target_addr: "127.0.0.1:30001".to_string(),
- tls_names: TlsNames::try_from("bing.com").unwrap(),
+ tls_names: TlsNames::try_from("badssl.com").unwrap(),
tls_ext: TlsExtConfig::new(None),
password: "test".to_string(),
nodelay: true,
@@ -22,7 +22,7 @@ fn tls12_v2() {
let server = RunningArgs::Server {
listen_addr: "127.0.0.1:30001".to_string(),
target_addr: "captive.apple.com:80".to_string(),
- tls_addr: TlsAddrs::try_from("bing.com").unwrap(),
+ tls_addr: TlsAddrs::try_from("badssl.com").unwrap(),
password: "test".to_string(),
nodelay: true,
fastopen: true,
@@ -31,7 +31,7 @@ fn tls12_v2() {
test_ok(client, server, CAPTIVE_HTTP_REQUEST, CAPTIVE_HTTP_RESP);
}
-// handshake: bing.com(tls1.2 only)
+// handshake: badssl.com(tls1.2 only)
// data: captive.apple.com:80
// protocol: v3 lossy
#[test]
@@ -39,7 +39,7 @@ fn tls12_v3_lossy() {
let client = RunningArgs::Client {
listen_addr: "127.0.0.1:30002".to_string(),
target_addr: "127.0.0.1:30003".to_string(),
- tls_names: TlsNames::try_from("bing.com").unwrap(),
+ tls_names: TlsNames::try_from("badssl.com").unwrap(),
tls_ext: TlsExtConfig::new(None),
password: "test".to_string(),
nodelay: true,
@@ -49,7 +49,7 @@ fn tls12_v3_lossy() {
let server = RunningArgs::Server {
listen_addr: "127.0.0.1:30003".to_string(),
target_addr: "captive.apple.com:80".to_string(),
- tls_addr: TlsAddrs::try_from("bing.com").unwrap(),
+ tls_addr: TlsAddrs::try_from("badssl.com").unwrap(),
password: "test".to_string(),
nodelay: true,
fastopen: true,
@@ -58,7 +58,7 @@ fn tls12_v3_lossy() {
utils::test_ok(client, server, CAPTIVE_HTTP_REQUEST, CAPTIVE_HTTP_RESP);
}
-// handshake: bing.com(tls1.2 only)
+// handshake: badssl.com(tls1.2 only)
// data: captive.apple.com:80
// protocol: v3 strict
// v3 strict cannot work with tls1.2, so it must fail
@@ -68,7 +68,7 @@ fn tls12_v3_strict() {
let client = RunningArgs::Client {
listen_addr: "127.0.0.1:30004".to_string(),
target_addr: "127.0.0.1:30005".to_string(),
- tls_names: TlsNames::try_from("bing.com").unwrap(),
+ tls_names: TlsNames::try_from("badssl.com").unwrap(),
tls_ext: TlsExtConfig::new(None),
password: "test".to_string(),
nodelay: true,
@@ -78,7 +78,7 @@ fn tls12_v3_strict() {
let server = RunningArgs::Server {
listen_addr: "127.0.0.1:30005".to_string(),
target_addr: "captive.apple.com:80".to_string(),
- tls_addr: TlsAddrs::try_from("bing.com").unwrap(),
+ tls_addr: TlsAddrs::try_from("badssl.com").unwrap(),
password: "test".to_string(),
nodelay: true,
fastopen: true,
@@ -87,8 +87,8 @@ fn tls12_v3_strict() {
utils::test_ok(client, server, CAPTIVE_HTTP_REQUEST, CAPTIVE_HTTP_RESP);
}
-// handshake: bing.com(tls1.2 only)
-// data: bing.com:443
+// handshake: badssl.com(tls1.2 only)
+// data: badssl.com:443
// protocol: v2
// Note: v2 can not defend against hijack attack.
// Here hijack means directly connect to the handshake server.
@@ -98,8 +98,8 @@ fn tls12_v3_strict() {
fn tls12_v2_hijack() {
let client = RunningArgs::Client {
listen_addr: "127.0.0.1:30006".to_string(),
- target_addr: "bing.com:443".to_string(),
- tls_names: TlsNames::try_from("bing.com").unwrap(),
+ target_addr: "badssl.com:443".to_string(),
+ tls_names: TlsNames::try_from("badssl.com").unwrap(),
tls_ext: TlsExtConfig::new(None),
password: "test".to_string(),
nodelay: true,
@@ -109,7 +109,7 @@ fn tls12_v2_hijack() {
test_hijack(client);
}
-// handshake: bing.com(tls1.2 only)
+// handshake: badssl.com(tls1.2 only)
// data: captive.apple.com:80
// protocol: v3 lossy
// (v3 strict can not work with tls1.2)
@@ -121,8 +121,8 @@ fn tls12_v2_hijack() {
fn tls12_v3_lossy_hijack() {
let client = RunningArgs::Client {
listen_addr: "127.0.0.1:30007".to_string(),
- target_addr: "bing.com:443".to_string(),
- tls_names: TlsNames::try_from("bing.com").unwrap(),
+ target_addr: "badssl.com:443".to_string(),
+ tls_names: TlsNames::try_from("badssl.com").unwrap(),
tls_ext: TlsExtConfig::new(None),
password: "test".to_string(),
nodelay: true,

View File

@@ -0,0 +1,117 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "aho-corasick"
@@ -224,14 +224,13 @@ dependencies = [
[[package]]
name = "flume"
-version = "0.10.14"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
+checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095"
dependencies = [
"futures-core",
"futures-sink",
"nanorand",
- "pin-project",
"spin 0.9.8",
]
@@ -393,9 +392,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.6.4"
+version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
+checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "memoffset"
@@ -420,9 +419,9 @@ dependencies = [
[[package]]
name = "monoio"
-version = "0.2.0"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c91a9bcc2622991bc92f3b6d7dc495329c4863e4dc530d1748529b009bb2170a"
+checksum = "fd5be7ef0eea41e4e5b30fe55aa6fd15288c415118bcdceadd52fd3656816cc7"
dependencies = [
"auto-const-array",
"bytes",
@@ -430,9 +429,11 @@ dependencies = [
"fxhash",
"io-uring",
"libc",
+ "memchr",
"mio",
"monoio-macros",
"nix 0.26.4",
+ "once_cell",
"pin-project-lite",
"socket2",
"threadpool",
@@ -538,26 +539,6 @@ source = "registry+https://github.com/ru
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
-name = "pin-project"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
name = "pin-project-lite"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,7 +10,7 @@ repository = "https://github.com/ihciah/
version = "0.2.25"
[dependencies]
-monoio = { version = "0.2.0", features = ["sync"] }
+monoio = { version = "=0.2.2", features = ["sync"] }
monoio-rustls-fork-shadow-tls = { version = "0.3.0-mod.2" }
rustls-fork-shadow-tls = { version = "0.20.9-mod.2", default-features = false }
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,3 @@
-#![feature(impl_trait_in_assoc_type)]
-
mod client;
mod helper_v2;
mod server;
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,3 @@
-#![feature(type_alias_impl_trait)]
-
use std::{collections::HashMap, path::PathBuf, process::exit};
use clap::{Parser, Subcommand, ValueEnum};

View File

@@ -20,8 +20,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev.git
PKG_SOURCE_DATE:=2025-1-20
PKG_SOURCE_VERSION:=9afa3cacf947f910be46b69fc5a7a1fdd02fd5e6
PKG_MIRROR_HASH:=575b21803b28db8ab59ecbdb2cf21c4282881507b3a4267cc24f55bad12819cb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=b56d015394a3217750ec232570e012461a30af17de20d5598c3b026c8fcaa5b5
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=shadowsocks-rust
PKG_VERSION:=1.23.3
PKG_VERSION:=1.24.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/shadowsocks/shadowsocks-rust/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=cbbd2357e9ec00dc18bbf437cf1ac88fcb3376c50ed579c782f372cf75bb0a9b
PKG_HASH:=a89865d1c5203de1b732017dd032e85f943d1592e8d3152eb7d2c4f3fca387bf
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MIT

View File

@@ -14,8 +14,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev
PKG_SOURCE_DATE:=2018-03-07
PKG_SOURCE_VERSION:=d63ff863800a5645aca4309d5dd5962bd1e95543
PKG_MIRROR_HASH:=34308ed827a5dd4f4e35619914102d55b00604faa44fda051d1d25fb4a319325
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=146fa4511a52da2aaa1e11ea0294cfb450e62643156c5da3b10e037ef43961f6
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE

View File

@@ -1,6 +1,9 @@
#
# Copyright (C) 2017-2019 Jian Chang <aa65535@live.com>
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
@@ -9,55 +12,49 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=simple-obfs
PKG_VERSION:=0.0.5
PKG_RELEASE:=$(AUTORELEASE)
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocks/simple-obfs.git
PKG_MIRROR_HASH:=ea8f2b9825bbb87d5d860524e29bade265141687338db2dbf7ecd32690cf02fc
PKG_SOURCE_DATE:=2019-08-17
PKG_SOURCE_VERSION:=486bebd9208539058e57e23a12f23103016e09b4
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=bc97eba511b86a089ab4bcf0ac78d9e4a39c59046d5cde77b79a118245daa0ba
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING LICENSE
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Jian Chang <aa65535@live.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_BUILD_FLAGS:=no-mips16
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=libev
PKG_CONFIG_DEPENDS:= CONFIG_SIMPLE_OBFS_STATIC_LINK
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/simple-obfs
define Package/simple-obfs/template
SECTION:=net
CATEGORY:=Network
TITLE:=Simple-obfs
URL:=https://github.com/shadowsocks/simple-obfs
DEPENDS:=+libpthread +!SIMPLE_OBFS_STATIC_LINK:libev
DEPENDS:=+libpthread +libev
endef
Package/simple-obfs-server = $(Package/simple-obfs)
define Package/simple-obfs-client
$(call Package/simple-obfs/template)
TITLE+= (client)
PROVIDES:=simple-obfs
endef
define Package/simple-obfs-server/config
menu "Simple-obfs Compile Configuration"
depends on PACKAGE_simple-obfs || PACKAGE_simple-obfs-server
config SIMPLE_OBFS_STATIC_LINK
bool "enable static link libraries."
default n
endmenu
define Package/simple-obfs-server
$(call Package/simple-obfs/template)
TITLE+= (server)
endef
define Package/simple-obfs/description
Simple-obfs is a simple obfusacting tool, designed as plugin server of shadowsocks.
Simple-obfs is a simple obfusacting tool, designed as plugin server of shadowsocks.
endef
Package/simple-obfs-client/description = $(Package/simple-obfs/description)
Package/simple-obfs-server/description = $(Package/simple-obfs/description)
CONFIGURE_ARGS += \
@@ -65,21 +62,15 @@ CONFIGURE_ARGS += \
--disable-documentation \
--disable-assert
ifeq ($(CONFIG_SIMPLE_OBFS_STATIC_LINK),y)
CONFIGURE_ARGS += \
--with-ev="$(STAGING_DIR)/usr" \
LDFLAGS="-Wl,-static -static -static-libgcc"
endif
define Package/simple-obfs/install
define Package/simple-obfs-client/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfs-local $(1)/usr/bin/obfs-local
endef
define Package/simple-obfs-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfs-server $(1)/usr/bin/obfs-server
endef
$(eval $(call BuildPackage,simple-obfs))
$(eval $(call BuildPackage,simple-obfs-client))
$(eval $(call BuildPackage,simple-obfs-server))

View File

@@ -0,0 +1,22 @@
From bc8014cd6637798ee96b9394c716eff46115c002 Mon Sep 17 00:00:00 2001
From: DDoSolitary <DDoSolitary@gmail.com>
Date: Thu, 12 Mar 2020 12:15:37 +0800
Subject: [PATCH] Convert arguments of isdigit to int.
---
src/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils.c b/src/utils.c
index 67cc250..514a001 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -92,7 +92,7 @@ int
ss_isnumeric(const char *s) {
if (!s || !*s)
return 0;
- while (isdigit(*s))
+ while (isdigit((int)*s))
++s;
return *s == '\0';
}

View File

@@ -1,141 +1,132 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
# Copyright (C) 2022-2023 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=sing-box
PKG_VERSION:=1.11.9
PKG_VERSION:=1.12.14
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=ee0c183ed9c431a2b6b5f12cad0cfb1d2bccb83147b641d50a619a381fa9d449
PKG_HASH:=f19761d09f88e2d33aadfdb3c4ff471654f34b28561826e4786b9859654ca887
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_CONFIG_DEPENDS:= \
CONFIG_SING_BOX_BUILD_ACME \
CONFIG_SING_BOX_BUILD_CLASH_API \
CONFIG_SING_BOX_BUILD_DHCP \
CONFIG_SING_BOX_BUILD_EMBEDDED_TOR \
CONFIG_SING_BOX_BUILD_GRPC \
CONFIG_SING_BOX_BUILD_GVISOR \
CONFIG_SING_BOX_BUILD_QUIC \
CONFIG_SING_BOX_BUILD_TAILSCALE \
CONFIG_SING_BOX_BUILD_UTLS \
CONFIG_SING_BOX_BUILD_V2RAY_API \
CONFIG_SING_BOX_BUILD_WIREGUARD
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_BUILD_FLAGS:=no-mips16
GO_PKG:=github.com/sagernet/sing-box
GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/sing-box
GO_PKG_LDFLAGS_X:=$(GO_PKG)/constant.Version=v$(PKG_VERSION)
GO_PKG_LDFLAGS_X:=$(GO_PKG)/constant.Version=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/$(PKG_NAME)
define Package/sing-box
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=The universal proxy platform.
URL:=https://sing-box.sagernet.org
TITLE:=The universal proxy platform
URL:=https://sing-box.sagernet.org/
DEPENDS:=$(GO_ARCH_DEPENDS) \
+ca-bundle \
+kmod-inet-diag \
+kmod-netlink-diag \
+kmod-tun
+SING_BOX_BUILD_GVISOR:kmod-tun
USERID:=sing-box=5566:sing-box=5566
endef
define Package/$(PKG_NAME)/description
Sing-box is a universal proxy platform which supports hysteria, SOCKS,
Shadowsocks, ShadowTLS, Tor, trojan, VLess, VMess, WireGuard and so on.
define Package/sing-box/description
Sing-box is a universal proxy platform which supports hysteria, SOCKS, Shadowsocks,
ShadowTLS, Tor, trojan, VLess, VMess, WireGuard and so on.
endef
GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=1
define Package/sing-box/config
if PACKAGE_sing-box
config SING_BOX_BUILD_ACME
bool "Build with ACME TLS certificate issuer support"
default y
define Package/$(PKG_NAME)/config
menu "Customizing build tags"
depends on PACKAGE_sing-box
config SING_BOX_BUILD_CLASH_API
bool "Build with Clash API support"
default y
config SING_BOX_WITH_ACME
bool "Build with ACME TLS certificate issuer support"
default n
config SING_BOX_BUILD_DHCP
bool "Build with DHCP support"
config SING_BOX_WITH_CLASH_API
bool "Build with Clash API support (EXPERIMENTAL!!!)"
default y
config SING_BOX_BUILD_EMBEDDED_TOR
bool "Build with embedded Tor support"
depends on BROKEN
config SING_BOX_WITH_DHCP
bool "Build with DHCP support"
default y
config SING_BOX_BUILD_GRPC
bool "Build with standard gPRC support"
help
Standard gRPC has good compatibility but poor performance.
config SING_BOX_WITH_ECH
bool "Build with TLS ECH extension support"
default y
config SING_BOX_BUILD_GVISOR
bool "Build with gVisor support"
default y
config SING_BOX_WITH_GRPC
bool "Build with standard gRPC support"
default n
help
sing-box has better performance gun-lite gRPC built-in by default.
This standard gRPC has better compatibility but poor performance.
config SING_BOX_BUILD_QUIC
bool "Build with QUIC support"
default y
help
Required by HTTP3 DNS transports, Naive inbound,
Hysteria inbound / outbound, and v2ray QUIC transport.
config SING_BOX_WITH_GVISOR
bool "Build with gVisor support"
default y
config SING_BOX_BUILD_TAILSCALE
bool "Build with Tailscale support"
default y
config SING_BOX_WITH_QUIC
bool "Build with QUIC support"
default y
help
Required by HTTP3 DNS transports, Naive inbound,
Hysteria inbound / outbound, and v2ray QUIC transport.
config SING_BOX_BUILD_UTLS
bool "Build with uTLS support"
default y
config SING_BOX_WITH_REALITY_SERVER
bool "Build with reality TLS server support"
default n
config SING_BOX_BUILD_V2RAY_API
bool "Build with V2Ray API support"
config SING_BOX_WITH_UTLS
bool "Build with uTLS support"
default y
config SING_BOX_WITH_V2RAY_API
bool "Build with V2Ray API support (EXPERIMENTAL!!!)"
default n
config SING_BOX_WITH_WIREGUARD
bool "Build with WireGuard support"
default y
endmenu
config SING_BOX_BUILD_WIREGUARD
bool "Build with WireGuard support"
default y
endif
endef
PKG_CONFIG_DEPENDS:= \
CONFIG_SING_BOX_WITH_ACME \
CONFIG_SING_BOX_WITH_CLASH_API \
CONFIG_SING_BOX_WITH_DHCP \
CONFIG_SING_BOX_WITH_ECH \
CONFIG_SING_BOX_WITH_GRPC \
CONFIG_SING_BOX_WITH_GVISOR \
CONFIG_SING_BOX_WITH_QUIC \
CONFIG_SING_BOX_WITH_REALITY_SERVER \
CONFIG_SING_BOX_WITH_UTLS \
CONFIG_SING_BOX_WITH_V2RAY_API \
CONFIG_SING_BOX_WITH_WIREGUARD
GO_PKG_TAGS:=$(subst $(space),$(comma),$(strip \
$(if $(CONFIG_SING_BOX_WITH_ACME),with_acme) \
$(if $(CONFIG_SING_BOX_WITH_CLASH_API),with_clash_api) \
$(if $(CONFIG_SING_BOX_WITH_DHCP),with_dhcp) \
$(if $(CONFIG_SING_BOX_WITH_ECH),with_ech) \
$(if $(CONFIG_SING_BOX_WITH_GRPC),with_grpc) \
$(if $(CONFIG_SING_BOX_WITH_GVISOR),with_gvisor) \
$(if $(CONFIG_SING_BOX_WITH_QUIC),with_quic) \
$(if $(CONFIG_SING_BOX_WITH_REALITY_SERVER),with_reality_server) \
$(if $(CONFIG_SING_BOX_WITH_UTLS),with_utls) \
$(if $(CONFIG_SING_BOX_WITH_V2RAY_API),with_v2ray_api) \
$(if $(CONFIG_SING_BOX_WITH_WIREGUARD),with_wireguard) \
$(if $(CONFIG_SING_BOX_BUILD_ACME),with_acme) \
$(if $(CONFIG_SING_BOX_BUILD_CLASH_API),with_clash_api) \
$(if $(CONFIG_SING_BOX_BUILD_DHCP),with_dhcp) \
$(if $(CONFIG_SING_BOX_BUILD_EMBEDDED_TOR),with_embedded_tor) \
$(if $(CONFIG_SING_BOX_BUILD_GRPC),with_grpc) \
$(if $(CONFIG_SING_BOX_BUILD_GVISOR),with_gvisor) \
$(if $(CONFIG_SING_BOX_BUILD_QUIC),with_quic) \
$(if $(CONFIG_SING_BOX_BUILD_TAILSCALE),with_tailscale) \
$(if $(CONFIG_SING_BOX_BUILD_UTLS),with_utls) \
$(if $(CONFIG_SING_BOX_BUILD_V2RAY_API),with_v2ray_api) \
$(if $(CONFIG_SING_BOX_BUILD_WIREGUARD),with_wireguard) \
))
define Package/$(PKG_NAME)/conffiles
define Package/sing-box/conffiles
endef
define Package/$(PKG_NAME)/install
define Package/sing-box/install
$(call GoPackage/Package/Install/Bin,$(1))
endef

View File

@@ -1,46 +1,36 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2014 OpenWrt-dist
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=tcping
PKG_VERSION:=0.3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Lienol/tcping.git
PKG_SOURCE_DATE:=2020-07-04
PKG_SOURCE_VERSION:=db9101834732dac9aaa59dbb7fb9c74612dbf723
PKG_MIRROR_HASH:=36776bf64c41d0c2c2aeb79525499532831133f7b5e174fc51e9e2d7202d5776
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=license.txt
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Lienol/tcping
PKG_MIRROR_HASH:=79414cd8e1d124422a36b8fe36a1f296b7d9bde99807b2c90ad81bbd65e200e0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=db9101834732dac9aaa59dbb7fb9c74612dbf723
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/tcping
SECTION:=net
CATEGORY:=Network
TITLE:=tcping measures the latency of a tcp-connection
URL:=https://github.com/jlyo/tcping
endef
define Package/tcping/description
endef
define Package/tcping/conffiles
SECTION:=net
CATEGORY:=Network
TITLE:=tcping measures the latency of a tcp-connection
URL:=https://github.com/jlyo/tcping
endef
define Package/tcping/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/bin/
endef
$(eval $(call BuildPackage,tcping))

View File

@@ -14,8 +14,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/peter-tank/trojan-plus.git
PKG_SOURCE_DATE:=2020-09-06
PKG_SOURCE_VERSION:=a6394cdd718669b0c7491493a78e61f6f0f899b3
PKG_MIRROR_HASH:=2d37d09fe6d39d7981116ad387706f58f2b30b74a34e27fc5608f267dacc9208
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=0bc832390044668dc163e9fec3c6cf7ac3037dc30a706e94292d974446c43d97
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=openssl
@@ -26,6 +25,7 @@ PKG_MAINTAINER:=Trojan-Plus-Group
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include ./boost-version.mk
TARGET_CXXFLAGS += -Wall -Wextra
TARGET_CXXFLAGS += $(FPIC)
@@ -59,7 +59,8 @@ define Package/trojan-plus
URL:=https://github.com/Trojan-Plus-Group/trojan-plus
DEPENDS:= \
+libpthread +libstdcpp +libopenssl \
+boost +boost-system +boost-program_options
+boost +boost-program_options \
$(if $(filter y,$(NEED_BOOST_SYSTEM)),,+boost-system)
endef
define Package/trojan-plus/install

View File

@@ -0,0 +1,12 @@
# boost-version.mk
BOOST_MAKEFILE := $(firstword $(shell find -L $(TOPDIR) -type f -path "*/boost/Makefile"))
BOOST_PKG_VERSION := $(shell grep '^PKG_VERSION:=' $(BOOST_MAKEFILE) | head -n1 | cut -d= -f2)
BOOST_VER_MAJOR := $(word 1,$(subst ., ,$(BOOST_PKG_VERSION)))
BOOST_VER_MINOR := $(word 2,$(subst ., ,$(BOOST_PKG_VERSION)))
BOOST_VER_PATCH := $(word 3,$(subst ., ,$(BOOST_PKG_VERSION)))
BOOST_VERSION_CODE := $(shell echo $$(($(BOOST_VER_MAJOR)*100000 + $(BOOST_VER_MINOR)*100 + $(BOOST_VER_PATCH))))
NEED_BOOST_SYSTEM := $(if $(shell [ $(BOOST_VERSION_CODE) -ge 108900 ] && echo y),y,n)

View File

@@ -0,0 +1,52 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,26 +184,45 @@ endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (ANDROID)
- set(ANDROID_MY_LIBS ${PROJECT_SOURCE_DIR}/trojan-plus-android-libs)
+ set(ANDROID_MY_LIBS ${PROJECT_SOURCE_DIR}/trojan-plus-android-libs)
+
+ find_path(BOOST_INCLUDE_DIR
+ NAMES boost/version.hpp
+ HINTS ${ANDROID_MY_LIBS}/include
+ )
+
set(ANDROID_MY_LIBS_LIBRARIES
${ANDROID_MY_LIBS}/lib/${ANDROID_ABI}/libssl.a
${ANDROID_MY_LIBS}/lib/${ANDROID_ABI}/libcrypto.a
- ${ANDROID_MY_LIBS}/lib/${ANDROID_ABI}/libboost_system.a
${ANDROID_MY_LIBS}/lib/${ANDROID_ABI}/libboost_program_options.a)
+ if(BOOST_INCLUDE_DIR)
+ file(STRINGS "${BOOST_INCLUDE_DIR}/boost/version.hpp" BOOST_VERSION_LINE REGEX "^#define BOOST_VERSION ")
+ string(REGEX REPLACE "^#define BOOST_VERSION ([0-9]+)" "\\1" BOOST_VERSION ${BOOST_VERSION_LINE})
+
+ if(${BOOST_VERSION} VERSION_LESS 108900)
+ list(APPEND ANDROID_MY_LIBS_LIBRARIES ${ANDROID_MY_LIBS}/lib/${ANDROID_ABI}/libboost_system.a)
+ endif()
+ endif()
+
set(OPENSSL_VERSION 1.1.1)
include_directories(${ANDROID_MY_LIBS}/include)
target_link_libraries(trojan ${ANDROID_MY_LIBS_LIBRARIES})
else()
- find_package(Boost 1.66.0 REQUIRED COMPONENTS system program_options)
+ find_package(Boost 1.66.0 REQUIRED)
+ if (Boost_MAJOR_VERSION LESS_EQUAL 1 AND Boost_MINOR_VERSION LESS 89)
+ find_package(Boost 1.66.0 REQUIRED COMPONENTS system program_options)
+ else()
+ find_package(Boost 1.66.0 REQUIRED COMPONENTS program_options)
+ endif()
include_directories(${Boost_INCLUDE_DIR})
target_link_libraries(trojan ${Boost_LIBRARIES})
if(MSVC)
add_definitions(-DBOOST_DATE_TIME_NO_LIB)
endif()
- find_package(OpenSSL 1.1.0 REQUIRED)
+ find_package(OpenSSL 1.1.1 REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(trojan ${OPENSSL_LIBRARIES})
endif()

View File

@@ -5,29 +5,29 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-geodata
PKG_RELEASE:=$(AUTORELEASE)
PKG_RELEASE:=1
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
GEOIP_VER:=202504050136
GEOIP_VER:=202512180020
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
define Download/geoip
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
URL:=https://github.com/Loyalsoldier/geoip/releases/download/$(GEOIP_VER)/
URL_FILE:=geoip.dat
FILE:=$(GEOIP_FILE)
HASH:=735786c00694313090c5d525516463836167422b132ce293873443613b496e92
HASH:=63c20c159aeec8a13d61be9b89d0d1c82fecf4675f1c177db67e97477c89199d
endef
GEOSITE_VER:=20250430053132
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
GEOSITE_VER:=202512202213
GEOSITE_FILE:=geosite.dat.$(GEOSITE_VER)
define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat
URL:=https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$(GEOSITE_VER)/
URL_FILE:=geosite.dat
FILE:=$(GEOSITE_FILE)
HASH:=c773807ff768ceea3bc99c77133024f59f5d0df1818fa51688e43c00a6941c95
HASH:=3f43687438bde815719ce0bcd9ed21c7fa807b69caa98ee1c7d6ed8954a8ff1a
endef
define Package/v2ray-geodata/template

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-plugin
PKG_VERSION:=5.25.0
PKG_VERSION:=5.41.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/teddysun/v2ray-plugin/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=64d2cc376c16ade97b8e2cce69e0c98d74f530dcf8a30cf7d22255969ca5c10d
PKG_HASH:=75d83f24e60fb7e71e7774732f6ebcfbc00a1b3ae27f4702f75afb14055ce606
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=Xray-core
PKG_VERSION:=25.4.30
PKG_VERSION:=25.12.8
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=4caff81848262684934022dca91cd00b3f28287c29c8229654e226a2ff7990c3
PKG_HASH:=d4519b2d9bb1871f4d7612aa7a8db1c451573b5a44ac824219bb44d63f404e61
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MPL-2.0