Compare commits

...
4954 Commits
Author SHA1 Message Date
Shtorm 6a6a1e0a31 Merge branch 'extended' of https://github.com/shtorm-7/sing-box into extended 2026-09-05 12:57:15 +03:00
Shtorm 217f77643f provider: Rename StoreProviders to StoreSubscriptions 2026-09-05 10:12:55 +03:00
Shtorm 7afda58818 provider: Add override_dialer_options option 2026-09-05 09:23:55 +03:00
Shtorm 64605fc47a protocol: Forward lifecycle Start stage to nested outbounds in vpn, failover and limiters 2026-09-05 04:30:03 +03:00
Shtorm 08703c9035 Update wireguard-go 2026-09-05 04:26:58 +03:00
ShtormandGitHub 28f6f4289e Update Amnezia version from 3.0 to 3.1
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-09-04 09:24:56 +03:00
Shtorm 8208af72ac build: add desktop release targets and trim go version suffix 2026-09-04 09:20:40 +03:00
Shtorm bcb83578d9 vless: fix nil pointer panic on encryption handshake failure 2026-09-04 06:01:33 +03:00
Shtorm 102330f968 provider: add store_providers cache_file option to gate subscription caching 2026-09-04 05:19:05 +03:00
Shtorm de3c7ff37e naive: wait for handshake before returning outbound conn 2026-09-04 04:42:43 +03:00
Shtorm 7fc9e5e773 examples: use ranges for amnezia timing options 2026-09-04 04:25:22 +03:00
Shtorm 2eeb120091 update rmux 2026-09-04 04:10:18 +03:00
Shtorm 301df12dee limiter: revert traffic limiter to Can/Add interface 2026-09-04 01:48:30 +03:00
Shtorm 673a408dca warp: add address/port option to override peer endpoint 2026-09-04 01:42:45 +03:00
Shtorm 04922b1898 parser/link: support gecko obfs in hysteria2 links 2026-09-04 01:41:33 +03:00
Shtorm 3540c09b93 masque: add address/port option to override endpoint 2026-09-04 01:40:28 +03:00
Shtorm 25618424e6 limiter: use named routers, keep original inbound metadata 2026-09-04 01:30:11 +03:00
Shtorm eac79f2080 mieru: add mtu and handshake_mode options 2026-09-04 01:24:10 +03:00
Shtorm b0ec582349 Regenerate started_service_grpc.pb.go 2026-09-04 01:08:46 +03:00
Shtorm c0bfc731ec Merge tag 'v1.14.0' 2026-09-04 01:08:30 +03:00
Shtorm 99bbd49406 Remove Snell and OpenVPN 2026-09-02 21:01:21 +03:00
世界 0b8995879f Bump version 2026-08-31 11:28:31 +08:00
世界 65a50758e1 Update naiveproxy to v150.0.7871.63-2 2026-08-31 11:28:31 +08:00
世界 138ba19b25 Add desktop client dev branch support 2026-08-31 11:28:31 +08:00
世界 336cde087e Run tests on oldstable branch 2026-08-31 08:46:29 +08:00
世界 a48b4cbd89 release: Fetch client main branch explicitly in update_clients.sh 2026-08-31 08:46:29 +08:00
世界 05b6802cfa Fix QUIC congestion control application limited reporting
Report application limited to injected congestion controllers when the packer stays empty for longer than the pacer burst window, instead of suppressing the report within one RTT of a pacing or congestion limit. The suppression let low bandwidth samples from small bursts after idle periods enter the BBR bandwidth filter, so long-lived TUIC and naive QUIC connections lost throughput after light traffic.
2026-08-30 17:46:30 +08:00
世界 a9713335fd boxdd: Fix log output 2026-08-30 17:41:47 +08:00
世界 66beaf541e Test nested groups recursively in URLTest 2026-08-30 17:41:47 +08:00
世界 dd9cdbc712 tailscale: Fix endpoint start failure when no route is available 2026-08-30 17:41:47 +08:00
世界 384344ead3 Bump version 2026-08-30 17:41:47 +08:00
世界 6aecbe2750 snell: Fuse client handshake with the first payload 2026-08-30 17:41:47 +08:00
世界 2a38f30125 Add Tailscale certificate API commands 2026-08-30 17:41:47 +08:00
世界 4658dfc6c6 Make badlinkname without bad linkname 2026-08-30 17:41:47 +08:00
世界 fb0063221d Remove tlsunsafeekm GODEBUG default 2026-08-30 17:41:47 +08:00
世界 f50ca2244b Fix HTTP/2 transport reset with Go 1.27 2026-08-30 17:41:47 +08:00
世界 de7460ec7c Update Go to 1.26.7 2026-08-30 17:41:47 +08:00
世界 c53c2375c4 Improve power report 2026-08-30 17:41:47 +08:00
世界 3f986d584e Discard OOM drafts written by previous app versions 2026-08-30 17:41:47 +08:00
世界 103e266ebc Fix QUIC congestion control
- Remove `bbr_standard`, `bbr2` and `bbr2_variant` from the naive inbound
- Report injected congestion controllers with connection-wide packet numbers in quic-go
2026-08-30 17:41:47 +08:00
世界 55b18b2271 Migrate Apple developer account 2026-08-30 17:41:47 +08:00
世界 3439be1bbb Do not hide groups containing only a single item 2026-08-30 17:41:47 +08:00
世界 a349a0d769 Fix naive quic congestion control 2026-08-30 17:41:47 +08:00
世界 310206a889 Fix naive performance 2026-08-30 17:41:47 +08:00
世界 be54f9afef endpoint: Drop packets to non-IP destinations 2026-08-30 17:41:47 +08:00
世界 673485755c Fix fakeip UDP reply address mapping 2026-08-30 17:41:47 +08:00
世界 33e63afb0f snell: Fix UDP requests to domain destinations 2026-08-30 17:41:46 +08:00
世界 37da1712e0 naive: Fix receive window options not published 2026-08-30 17:41:46 +08:00
世界 080f1c56aa Fix bbolt recover 2026-08-30 17:41:46 +08:00
世界 82098a8760 Add power report service 2026-08-30 17:41:46 +08:00
世界 6d431a2c43 Improve traffic totals 2026-08-30 17:41:46 +08:00
世界 08986ad405 Fix address filter matching for inverted legacy DNS rules
Inverted rules whose address filter conditions come from rule sets or
logical rules were rejected during pre-lookup matching, so the lookup was
never sent and the rules never matched; for plain ip rule sets this was a
regression from the rule-set invert fix in 1.12.22. Pre-lookup matching
now tracks whether the result depends on deferred address filter
conditions and defers such rules to the response phase, while results
already determined by evaluated conditions are still decided during
pre-lookup.
2026-08-30 17:41:46 +08:00
世界 aea28ca6dc Cache tproxy UDP write-back connection when netns is configured 2026-08-30 17:41:46 +08:00
世界 e6b7c6ca75 Invalidate remote rule-set cache when URL changes 2026-08-30 17:41:46 +08:00
世界 7d84f7d3e0 Fix lint errors 2026-08-30 17:41:46 +08:00
世界 ba4146ea31 Reformat code 2026-08-30 17:41:46 +08:00
世界 e4ec3b0345 Fix bbolt flock 2026-08-30 17:41:46 +08:00
世界 6720a27109 Handle network update callbacks in background 2026-08-30 17:41:46 +08:00
世界 cfddedb3da daemon: Fix start or reload race 2026-08-30 17:41:46 +08:00
世界 2e238abe01 Fix network environment log 2026-08-30 17:41:46 +08:00
世界 ec497c7dda Fix tailssh pixels 2026-08-30 17:41:46 +08:00
世界 0a5078a848 Package usbip drivers with the daemon 2026-08-30 17:41:46 +08:00
世界 f7e6a85166 Fix duplicate interface binding for UDP connections 2026-08-30 17:41:46 +08:00
世界 680f37182f Install Apple provisioning profiles from a variable number of secrets 2026-08-30 17:41:46 +08:00
世界 495446cf4f Update Go to 1.26.6 2026-08-30 17:41:46 +08:00
世界 4b30a03adf Add Taildrop support 2026-08-30 17:41:46 +08:00
世界 c86164bd1b Fix file descriptor double close when netlink socket bind fails 2026-08-30 17:41:46 +08:00
世界 bd059fc8aa Add api command 2026-08-30 17:41:45 +08:00
世界 fcee5656b9 daemon: Send complete initial snapshots in status subscriptions 2026-08-30 17:41:45 +08:00
世界 24d1f271bf Add listen_port option to Tailscale endpoint 2026-08-30 17:41:45 +08:00
世界 b3a45e0839 Add query_client_subnet and query_dnssec DNS rule items and remove_client_subnet DNS route action option 2026-08-30 17:41:45 +08:00
世界 4e91d92c5f Refactor local DNS cache partitioning 2026-08-30 17:41:45 +08:00
世界 96fe4f7317 documentation: Rename Root Helper to Helper Service 2026-08-30 17:41:45 +08:00
世界 20b4b8e17d daemon: Throttle group and outbound subscription pushes
- Limit SubscribeGroups and SubscribeOutbounds to one push per 250ms, coalescing bursts of URLTest updates
2026-08-30 17:41:45 +08:00
世界 87c4f84a89 Fix search domain handling in DNS transports 2026-08-30 17:41:45 +08:00
世界 0e75f5f45c Partition local DNS caches by interface signature 2026-08-30 17:41:45 +08:00
世界 28b25598ed Refactor local DNS transport 2026-08-30 17:41:45 +08:00
世界 1e2846a1a5 Resolve and race all WireGuard addresses on handshake 2026-08-30 17:41:45 +08:00
世界 ce25e7791d openconnect: Improve PPP carrier tolerance 2026-08-30 17:41:45 +08:00
世界 0b850d6b56 Fix Android process finder 2026-08-30 17:41:45 +08:00
世界 a8091761d7 Fix missing process info in hijacked DNS queries 2026-08-30 17:41:45 +08:00
世界 097f784e7a daemon: Fix endpoint subscription 2026-08-30 17:41:45 +08:00
世界 06a82b6601 Enable stateless reset for hysteria2 server when obfs disabled 2026-08-30 17:41:45 +08:00
世界 baa8580efd Update Go to 1.26.5 2026-08-30 17:41:45 +08:00
世界 059508ed7a Avoid clearing DNS caches during network resets 2026-08-30 17:41:45 +08:00
世界 5572b3c329 Fix QUIC connection closed by ENOBUFS
Batched darwin packet I/O now also covers connected sockets on iOS.
2026-08-30 17:41:45 +08:00
世界 0dd17d78d8 Fix DNS response buffer headroom 2026-08-30 17:41:45 +08:00
世界 baa99c6f8f Package WinDivert drivers instead of embedding it 2026-08-30 17:41:45 +08:00
世界 9ea88e556a Fix hysteria2 chrome parrot 2026-08-30 17:41:45 +08:00
世界 2f766be0be Improve UDP packet usage for darwin 2026-08-30 17:41:45 +08:00
世界 5c50f7a084 Use connected sockets for QUIC clients 2026-08-30 17:41:45 +08:00
世界 93a4bbacbe Fix security check for executables 2026-08-30 17:41:45 +08:00
NagaseMinatoand世界 eb6db316cc dns: Fix preferred_by local support for platform local transport 2026-08-30 17:41:45 +08:00
世界 ec3e95935f Add hysteria2 chrome parrot support 2026-08-30 17:41:45 +08:00
世界 10d37384f0 Update quic-go to v0.61.0 2026-08-30 17:41:45 +08:00
世界 e797c2d0ba Update tailscale to v1.102.1 2026-08-30 17:41:45 +08:00
世界 9bf39f85f9 Remove client metadata from AnyTLS requests by default 2026-08-30 17:41:45 +08:00
世界 475eb7c845 Fix TLS fragment ACK wait on Windows without TCP estats
Recent Windows 11 builds remove TCP estats, which made writeAndWaitAck
return without waiting for acknowledgment. sing now queries
SIO_TCP_INFO on the socket instead, and falls back to estats on
systems predating it (Windows 10 1703).
2026-08-30 17:41:45 +08:00
世界 b3a6dcda5f wireguard: Fix system device configures DNS for interface 2026-08-30 17:41:44 +08:00
世界 cdbfceafd1 dns: Fix completed race rule blocked by earlier armed rule 2026-08-30 17:41:44 +08:00
世界 34397d5dc8 release: Fix rpm package format for desktop client 2026-08-30 17:41:44 +08:00
世界 9220eb136c Fix openvpn 2026-08-30 17:41:44 +08:00
世界 525e98b05b Fix string type 2026-08-30 17:41:44 +08:00
世界 251a508fae Fix inconsistent URLTest results 2026-08-30 17:41:44 +08:00
世界 c90f3564e8 daemon: Improve URLTest 2026-08-30 17:41:44 +08:00
世界 1698e6cf66 Add initial_path option to remote rule-sets 2026-08-30 17:41:44 +08:00
世界 ec884dd508 release: Fix linux sign 2026-08-30 17:41:44 +08:00
世界 6e09f2892a Add JSON schema support 2026-08-30 17:41:44 +08:00
世界 e09e3b49f9 dns: Add namespace and parallel support for evaluate 2026-08-30 17:41:44 +08:00
世界 510586c4f8 route: simplify rule_set matching semantics
Since b0c6762bc, every rule inside a referenced rule-set was evaluated
as if merged into the outer rule, which required tracking per-branch
group states and let outer rules and rule-set rules satisfy each
other's grouped conditions in both directions.

Restrict merging to the only designed case: a rule-set containing
exactly one non-inverted default rule is merged into the outer rule as
before. Any other rule-set now matches as an ordinary condition of the
outer rule: it matches when any of its rules matches on its own, and
its rules no longer exchange grouped match state with the outer rule
in either direction. Multiple referenced rule-sets keep OR semantics.

Flat address rule-sets such as generated geosite/geoip sets contain a
single default rule, so their behavior is unchanged. The group-state
set machinery is replaced by a single required/satisfied mask pair.

Also update the route and DNS rule docs.
2026-08-30 17:41:44 +08:00
世界 442177de59 platform: Fix WIFI state on reload 2026-08-30 17:41:44 +08:00
世界 7a20afb289 Fix Fortinet SSO again 2026-08-30 17:41:44 +08:00
世界 88ab140cf9 dns: Probe connection reuse support for TCP transports 2026-08-30 17:41:44 +08:00
世界 df0946c2a4 dns: Cache responses with client subnet 2026-08-30 17:41:44 +08:00
世界 b84fb4952e Fix Tailscale 4via6 subnet routing 2026-08-30 17:41:44 +08:00
世界 80044d655f release: Improve release workflow 2026-08-30 17:41:44 +08:00
世界 b491cac8f7 Add Fortinet hostcheck support 2026-08-30 17:41:44 +08:00
世界 866f93fa2d Update issue template for new clients 2026-08-30 17:41:44 +08:00
flyzstuand世界 bc5f34343f Update uTLS to v1.8.7 2026-08-30 17:41:44 +08:00
世界 33e42bf423 Fix TCP DNS retry 2026-08-30 17:41:44 +08:00
世界 71aedcac87 boxdd: Fix windows update 2026-08-30 17:41:44 +08:00
世界 30d40d09de build: Refactor workflow 2026-08-30 17:41:44 +08:00
世界 b9c7d52582 Improve OpenVPN & OpenConnect interoperability 2026-08-30 17:41:44 +08:00
世界 b2f1f630d9 Fix security check message 2026-08-30 17:41:44 +08:00
世界 086e0b87cf openvpn: Fix certificate verification compatibility 2026-08-30 17:41:44 +08:00
世界 18398cd3f2 boxdd: Fix unsafe permission check 2026-08-30 17:41:44 +08:00
世界 61f950bf61 Fix wg detour 2026-08-30 17:41:44 +08:00
世界 fc57a1b8ac openconnect: Fix Fortinet SSO 2026-08-30 17:41:44 +08:00
世界 abf7fe1b5b Add linux desktop build 2026-08-30 17:41:44 +08:00
世界 71c2388bed desktop: Pin dependencies 2026-08-30 17:41:44 +08:00
世界 f61d14b3ae boxdd: Implement linux http proxy 2026-08-30 17:41:43 +08:00
世界 e4c8b49eaf Improve network reset 2026-08-30 17:41:43 +08:00
世界 3afd290278 boxdd: Fix linux permission 2026-08-30 17:41:43 +08:00
世界 ee0ff1c4a2 Fix DNS route suffix matching 2026-08-30 17:41:43 +08:00
世界 5d424ea2ac refactor: Async DNS 2026-08-30 17:41:43 +08:00
世界 90d75b9673 Refactor UDP DNS hijack 2026-08-30 17:41:43 +08:00
世界 013dab8737 Fix SSO support for anyconnect 2026-08-30 17:41:43 +08:00
世界 6269e1c2b3 Refactor OpenVPN and OpenConnect endpoints 2026-08-30 17:41:43 +08:00
世界 b02ec478c5 Refactor endpoint in started interface 2026-08-30 17:41:43 +08:00
世界 719676519d Fix bind control for auto redirect 2026-08-30 17:41:43 +08:00
世界 2df7a9bac7 Add openvpn and openconnect 2026-08-30 17:41:43 +08:00
世界 23ca3b415f Update Go to 1.25.12 2026-08-30 17:41:43 +08:00
世界 668ced35f8 Refactor endpoint listen 2026-08-30 17:41:43 +08:00
世界 1f7d571017 refactor: New tun udpnat 2026-08-30 17:41:43 +08:00
世界 a072f21978 boxx: Fix unsafe installation 2026-08-30 17:41:43 +08:00
世界 9dfe842794 Add multiple tags support to rule-sets 2026-08-30 17:41:43 +08:00
世界 f65065fdf3 Fix iOS brdige 2026-08-30 17:41:43 +08:00
世界 3af1325a93 Fix oomkiller 2026-08-30 17:41:43 +08:00
世界 5ee69759e1 platform: Fix version compare 2026-08-30 17:41:43 +08:00
世界 b9572e5812 Fix start lifecycle 2026-08-30 17:41:43 +08:00
世界 0a4e4c8061 boxdd: Add insecure mode 2026-08-30 17:41:43 +08:00
世界 b4600dd4f7 Update windows build 2026-08-30 17:41:43 +08:00
世界 24d2626b52 tailscale: support Windows SSH user sessions 2026-08-30 17:41:43 +08:00
世界 5ba8abd0fd boxdd: Add custom working directory support 2026-08-30 17:41:43 +08:00
世界 c66dd4c8ad boxxx: Add update API 2026-08-30 17:41:43 +08:00
世界 ae2c5c84ef boxdd: Fix log format 2026-08-30 17:41:43 +08:00
世界 58d2ed88aa Add windows build 2026-08-30 17:41:43 +08:00
世界 680f37e9a6 Fix windows bridge 2026-08-30 17:41:43 +08:00
世界 c7c9feef95 Fix tun gso check 2026-08-30 17:41:43 +08:00
世界 9a96e63643 Fix SetGroupExpand race 2026-08-30 17:41:43 +08:00
世界 7f1a2bd2be windivert: stabilize Windows driver lifecycle 2026-08-30 17:41:43 +08:00
世界 2c65ed1ea1 Fix nfqueue options 2026-08-30 17:41:43 +08:00
世界 73e9ff81de documentation: Update icon svg 2026-08-30 17:41:42 +08:00
世界 4f330d73ec platform: Add http proxy support for Windows 2026-08-30 17:41:42 +08:00
世界 9eb60234fc platform: Fix daemon data 2026-08-30 17:41:42 +08:00
世界 9a543cfe42 platform: Add boxdd 2026-08-30 17:41:42 +08:00
世界 2e0466da94 Fix daemon groups 2026-08-30 17:41:42 +08:00
世界 13ca2511b1 bridge: Raise accept_ra to 2 when enabling IPv6 forwarding 2026-08-30 17:41:42 +08:00
世界 9bb5bf421d Fix windivert open 2026-08-30 17:41:42 +08:00
世界 4b79c5bdf1 platform: Export tester and reporter 2026-08-30 17:41:42 +08:00
世界 678b3d1703 windivert: Verify cached driver against embedded asset before load 2026-08-30 17:41:42 +08:00
世界 16c8393569 Fix netns manager 2026-08-30 17:41:42 +08:00
世界 9531a6a9cd Add netns and unshare support 2026-08-30 17:41:42 +08:00
世界 7b3993db12 Fix tailscale version 2026-08-30 17:41:42 +08:00
世界 b0eaf05225 Add connections to OOM report 2026-08-30 17:41:42 +08:00
世界 970d93d428 Add hysteria2 realm ip_version and port_mapping options 2026-08-30 17:41:42 +08:00
世界 b35a747dab Fix process and neighbor rules not matched in pre-match 2026-08-30 17:41:42 +08:00
世界 fa743743e1 Fix macOS bridge kernel panic 2026-08-30 17:41:42 +08:00
世界 17b12494de Fix macOS bridge with includeAllNetworks 2026-08-30 17:41:42 +08:00
世界 7004fc6fd4 Fix windows bridge forwarding to connected subnets 2026-08-30 17:41:42 +08:00
世界 edb7e1da15 Improve windivert syscall 2026-08-30 17:41:42 +08:00
世界 9df9269421 Fix bridge MTU 2026-08-30 17:41:42 +08:00
世界 017e2c53de Improve darwin bridge 2026-08-30 17:41:42 +08:00
世界 ec544485b9 Add windows bridge 2026-08-30 17:41:42 +08:00
世界 97bbf2a9a4 Improve bridge 2026-08-30 17:41:42 +08:00
世界 1e2f1d04da Add bridge outbound 2026-08-30 17:41:42 +08:00
世界 01e5196c12 daemon: Release memory to OS on service reload 2026-08-30 17:41:42 +08:00
世界 fa479edc12 Imrpove flow tracking & sniff action 2026-08-30 17:41:42 +08:00
世界 bcae189da3 Fix local DNS transport on darwin 2026-08-30 17:41:42 +08:00
世界 5f2054bf90 Add L3 forwarding support 2026-08-30 17:41:42 +08:00
世界 14fd94e9d4 Add snell protocol 2026-08-30 17:41:42 +08:00
世界 d1d19fcca3 dialer: Dial directly when only one interface is available 2026-08-30 17:41:41 +08:00
世界 154d74b7a0 tls: Fix read wait buffer sizing 2026-08-30 17:41:41 +08:00
世界 2eacabec1d Fix linux ping 2026-08-30 17:41:41 +08:00
世界 485761cbe8 Improve DHCP DNS server initialize
Avoid querying DHCP DNS servers on cellular networks
2026-08-30 17:41:41 +08:00
世界 31922cb2ba Add age support for report export 2026-08-30 17:41:41 +08:00
世界 98512fc8f6 Write logs to oom report 2026-08-30 17:41:41 +08:00
世界 2d581b35f3 Refactor darwin local DNS to raw mDNSResponder call 2026-08-30 17:41:41 +08:00
世界 99242f4113 release: Fix upload ios deb 2026-08-30 17:41:41 +08:00
世界 20846b2183 Fix oom draft flood 2026-08-30 17:41:41 +08:00
世界 7fc5657e8f platform: Fix missing api version check for usb/ip 2026-08-30 17:41:41 +08:00
世界 70c8549f02 certificate: Replace platform bridge with CGO JNI 2026-08-30 17:41:41 +08:00
世界 12431fe93c Add iOS jailbreak release 2026-08-30 17:41:41 +08:00
世界 fbc260b430 Fix Cloudflared edge discovery ignoring configured resolver 2026-08-30 17:41:41 +08:00
世界 d43170b00a documentation: Add USB/IP server and client 2026-08-30 17:41:41 +08:00
世界 16f2a39298 Add USB/IP support for macOS 2026-08-30 17:41:41 +08:00
世界 38b447c6b4 Add USB/IP service 2026-08-30 17:41:41 +08:00
世界 a123c041f7 Fix remote control when Clash server is unavailable 2026-08-30 17:41:41 +08:00
世界 2a7240ae27 Add dashboard support for API service 2026-08-30 17:41:41 +08:00
世界 d8cd38d31b Improve remote rule-set update 2026-08-30 17:41:41 +08:00
世界 7e1187a48f dns: Remove unused files 2026-08-30 17:41:41 +08:00
世界 9ef9a411b2 release: Fix apple release 2026-08-30 17:41:41 +08:00
世界 a89cac300d Fix group status updates broken by API service
The URL test history update hook and the Clash mode update hook were
single-slot: the API service's attached service overwrote the hook set
by the daemon, so clients stopped receiving group updates. Replace both
with multicast hook lists.

Also share a single URL test history storage via context: Clash API
looked it up under a key nobody registered and fell back to its own
empty storage, so dashboards showed no delay once an API service was
configured. Selector changes now notify through the shared storage,
covering selections made from any API surface.
2026-08-30 17:41:41 +08:00
世界 1f4e9e75ed tailscale: Fix auth URL not refreshed after logout 2026-08-30 17:41:41 +08:00
世界 c12367a013 Add sing-box API service 2026-08-30 17:41:41 +08:00
世界 2bd6a233dc daemon: Split host operations into ManagedService 2026-08-30 17:41:41 +08:00
世界 5d7a0d92c6 platform: Add shell support for iOS 2026-08-30 17:41:41 +08:00
世界 3d237fed39 platform: Add tailscale device name and logout 2026-08-30 17:41:41 +08:00
世界 4b853215c6 tailssh: fix platform SFTP session teardown 2026-08-30 17:41:41 +08:00
世界 b151c9e88d tailscale: Add tailssh server 2026-08-30 17:41:41 +08:00
世界 07e83f5981 tools: Fix mising cleanup 2026-08-30 17:41:40 +08:00
世界 3b9f5a0193 hysteria2: Add gecko obfs 2026-08-30 17:41:40 +08:00
世界 c03353ad0e daemon: Add Tailssh 2026-08-30 17:41:40 +08:00
世界 0d2fb35733 Fix tailscale dns 2026-08-30 17:41:40 +08:00
世界 fe34a79277 tailscale: Expose more peer info fields 2026-08-30 17:41:40 +08:00
世界 87dc0f797d tailscale: Add runtime exit node API 2026-08-30 17:41:40 +08:00
世界 27fe18d715 tailscale: Fix handle peer DNS query 2026-08-30 17:41:40 +08:00
世界 18fd5d7a7a tailscale: Revert dialer deprecation and remove control_http_client 2026-08-30 17:41:40 +08:00
世界 39a0167cbb oom-killer: Remove log "OOM draft discarded" 2026-08-30 17:41:40 +08:00
世界 704853b3be Fix lint errors 2026-08-30 17:41:40 +08:00
世界 f720383adc Fix hysteria2 realm server 2026-08-30 17:41:40 +08:00
世界 9895d60484 Fix TLS server close 2026-08-30 17:41:40 +08:00
世界 97b7c5f91f Update hysteria2 realm 2026-08-30 17:41:40 +08:00
世界 6da670ac45 Add hysteria2 realm service and support 2026-08-30 17:41:40 +08:00
世界 ae0c62aae8 Fix reset network 2026-08-30 17:41:40 +08:00
macronutand世界 d9290bc940 Add more spoof method
Signed-off-by: macronut <4027187+macronut@users.noreply.github.com>
2026-08-30 17:41:40 +08:00
世界 3c016c978b Allow customizing TUN DNS mode and hijack interface DNS by default 2026-08-30 17:41:40 +08:00
世界 caf940c805 dns: Add mDNS server 2026-08-30 17:41:40 +08:00
世界 14b8f1bd4d dns: Add preferred_by rule item 2026-08-30 17:41:40 +08:00
世界 f8a623e0c6 dns: Add neighbor-based hostname resolution to local server 2026-08-30 17:41:40 +08:00
世界 35540b4ff3 Fix tailscale start dependencies 2026-08-30 17:41:40 +08:00
世界 87c2b89120 dns: Add timeout configuration 2026-08-30 17:41:40 +08:00
世界 a0fcede368 ssh: Add cipher, MAC, and key exchange configuration 2026-08-30 17:41:40 +08:00
世界 c17407ec94 Improve oom-killer 2026-08-30 17:41:40 +08:00
世界 c9fb076dd7 Preserve comments between formatting 2026-08-30 17:41:40 +08:00
nekohasekai 9471dde765 Add Windows TLS engine 2026-08-30 17:41:40 +08:00
世界 2bbff23640 Improve UDP batch support 2026-08-30 17:41:40 +08:00
世界 9ab4c0f5cb Fix darwin cgo DNS again 2026-08-30 17:41:40 +08:00
世界 1322c0671b platform: Improve oom-killer 2026-08-30 17:41:40 +08:00
世界 7963713314 Add ACME profile support for IP address certificates 2026-08-30 17:41:40 +08:00
世界 0e7f176a16 Fix goroutine leak in networkquality tool
Serialize probe rounds in startProber to eliminate unbounded fan-out of
fire-and-forget probe goroutines (up to 100/sec per direction), and close
HTTP/3 transports via transport.Close() in addition to CloseIdleConnections.
2026-08-30 17:41:40 +08:00
世界 2496c846f4 Fix Tailscale search domain response name mismatch 2026-08-30 17:41:40 +08:00
世界 b4e670c36f Log DNS optimistic background refresh outcomes 2026-08-30 17:41:40 +08:00
世界 63373385f5 Add search domain support for Tailscale DNS 2026-08-30 17:41:40 +08:00
世界 a33858523f Fix tls-spoof 2026-08-30 17:41:40 +08:00
世界 9bcc0f1d37 Fix Apple TLS metadata capture 2026-08-30 17:41:40 +08:00
世界 836fa8ce58 Strip EDNS padding from upstream DNS responses 2026-08-30 17:41:40 +08:00
世界 7de1c4b4cf Defer implicit default HTTP client fallback to first use 2026-08-30 17:41:39 +08:00
世界 6877fba346 Scope HTTP/2 fallback and HTTP/3 broken state per authority 2026-08-30 17:41:39 +08:00
世界 c56d0f2462 Fix macOS tlsspoof 2026-08-30 17:41:39 +08:00
世界 2ddfecb47a Reject IP literal server name with TLS spoof 2026-08-30 17:41:39 +08:00
世界 3e8ea4e590 Fix use-after-free of pooled value buffers in bbolt Batch writes 2026-08-30 17:41:39 +08:00
世界 a04daaff75 Reject pure-IP rule-set references without match_response
DNS rules referencing rule-sets that contain only ip_cidr predicates
silently stopped matching when legacy DNS mode was disabled, because the
IP-CIDR branch cannot match against an in-flight DNS query. The existing
validation intentionally let every rule_set through on the premise that
mixed sets still work via their non-IP branches, which is only true when
such a branch exists. Track whether a rule-set carries any non-IP-CIDR
predicate and reject pure-IP references the same way bare ip_cidr fields
are already rejected.
2026-08-30 17:41:39 +08:00
世界 8e8d1dcca8 Fix legacy rule-set download_detour blocked by empty direct check 2026-08-30 17:41:39 +08:00
世界 40e2b5fd4b Add TLS spoof support 2026-08-30 17:41:39 +08:00
世界 c82163f287 Standardize hosts path 2026-08-30 17:41:39 +08:00
世界 2515811356 Refactor: HTTP clients, unified HTTP2/QUIC options, Apple engines 2026-08-30 17:41:39 +08:00
世界 3f242a7114 oom-killer: Record report before reset network 2026-08-30 17:41:39 +08:00
世界 c322ad5d33 Add optimistic DNS cache 2026-08-30 17:41:39 +08:00
世界 5cce5454e1 Fix tailscale error 2026-08-30 17:41:39 +08:00
世界 fe88004eaf Fix darwin cgo DNS again 2026-08-30 17:41:39 +08:00
世界 435d7e0cdf Fix stun test 2026-08-30 17:41:39 +08:00
世界 42ca206037 documentation: Fix missing update for ip_version and query_type 2026-08-30 17:41:39 +08:00
世界 ac7f1ca3aa Add cloudflared inbound 2026-08-30 17:41:39 +08:00
世界 2b691a94a4 Fix lint errors 2026-08-30 17:41:39 +08:00
世界 3b4f7c8ab7 platform: Wrap command RPC error returns with E.Cause 2026-08-30 17:41:39 +08:00
世界 bc6f9703e3 Add package_name_regex route, DNS and headless rule item 2026-08-30 17:41:39 +08:00
世界 cdf596da19 documentation: Fixes 2026-08-30 17:41:39 +08:00
世界 d72c1d9be7 Un-deprecate ip_accept_any DNS rule item 2026-08-30 17:41:39 +08:00
世界 ba059b0b2a tools: Tailscale status 2026-08-30 17:41:39 +08:00
世界 22e852cf36 Fix darwin local DNS transport 2026-08-30 17:41:39 +08:00
世界 496043dd9c Fix rules lock 2026-08-30 17:41:39 +08:00
世界 d2b10d3b09 Revert "Also enable certificate store by default on Apple platforms"
This reverts commit 62cb06c02fc569beb7b2ffa3f0a10ef23e136748.
2026-08-30 17:41:39 +08:00
世界 bd9a10d349 tools: Tailscale status 2026-08-30 17:41:39 +08:00
世界 f24691cd60 platform: Fix darwin signal handler 2026-08-30 17:41:39 +08:00
世界 07cdca0a2b tools: Network Quality & STUN 2026-08-30 17:41:39 +08:00
世界 7f86dffa06 oom-killer: Free memory on pressure notification and use gradual interval backoff 2026-08-30 17:41:39 +08:00
世界 1735da6c17 Fix deprecated warning double-formatting on localized clients 2026-08-30 17:41:39 +08:00
世界 37ac4d6b16 platform: Fix set local 2026-08-30 17:41:39 +08:00
nekohasekai cd77e78f0a Add evaluate DNS rule action and related rule items 2026-08-30 17:41:39 +08:00
世界 86170406af Also enable certificate store by default on Apple platforms
`SecTrustEvaluateWithError` is serial
2026-08-30 17:41:38 +08:00
世界 03412b12d0 platform: Add OOM Report & Crash Report 2026-08-30 17:41:38 +08:00
世界 da18cb70fa Add BBR profile and hop interval randomization for Hysteria2 2026-08-30 17:41:38 +08:00
nekohasekai 01b3d19d6d Refactor ACME support to certificate provider 2026-08-30 17:41:38 +08:00
世界 564cb451ac documentation: Update descriptions for neighbor rules 2026-08-30 17:41:38 +08:00
世界 1cde511d6d Add macOS support for MAC and hostname rule items 2026-08-30 17:41:38 +08:00
世界 39592518b0 Add Android support for MAC and hostname rule items 2026-08-30 17:41:38 +08:00
世界 57c62b5330 Add MAC and hostname rule items 2026-08-30 17:41:38 +08:00
世界 0c7b333743 Use sing-tun v0.8.15 tag 2026-08-30 17:41:22 +08:00
世界 6766b17131 Fix panic on TCP packets of an unconfigured address family in system stack 2026-08-30 17:32:28 +08:00
世界 bd602b6d11 Fix panic on websocket handshake failure 2026-08-30 17:23:03 +08:00
世界 56f91dfeab Bump version 2026-08-29 18:25:15 +08:00
世界 849ac908c8 Use sing-quic v0.6.5 tag 2026-08-29 17:06:50 +08:00
世界 0b5391447e Fix websocket early data with smux and yamux multiplex 2026-08-29 15:59:41 +08:00
世界 d34fbe99e8 Fix tailscale build with Go 1.27 2026-08-29 14:43:16 +08:00
世界 0aefee74c6 Fix TCP NAT port reuse across address families in system stack 2026-08-29 11:33:11 +08:00
世界 1c99c4ceac Use legacy Apple credentials 2026-08-27 18:48:04 +08:00
世界 4f15700db3 direct: Fix TUN loopback protection 2026-08-27 12:45:59 +08:00
世界 1389e2fd8e documentation: Fix matching logic note for DNS rules
The address filter fields ip_cidr, ip_is_private and ip_accept_any share
the destination address group with the domain fields, matching with OR
semantics like in route rules.
2026-08-22 16:14:54 +08:00
世界 4444f297c2 Fix address filter matching for inverted DNS rules
Inverted rules whose address filter conditions come from rule sets or
logical rules were rejected during pre-lookup matching, so the lookup was
never sent and the rules never matched; for plain ip rule sets this was a
regression from the rule-set invert fix in 1.12.22. Pre-lookup matching
now tracks whether the result depends on deferred address filter
conditions and defers such rules to the response phase, while results
already determined by evaluated conditions are still decided during
pre-lookup.
2026-08-22 16:14:54 +08:00
世界 c375fb0b7f Fix su lookup for auto_redirect on Android 2026-08-21 23:09:45 +08:00
世界 f7634d5846 Fix excessive TCP keepalive traffic in gVisor stack 2026-08-21 19:53:51 +08:00
世界 e4a4e8c790 Fix URLTest group hang on unresponsive outbound 2026-08-21 18:21:51 +08:00
世界 9d8d4b8796 Fix log output before service started 2026-08-21 17:42:42 +08:00
世界 b5ebaa1fc0 Bump version 2026-08-17 17:07:24 +08:00
世界 bf41bb4ced Install Apple provisioning profiles from a variable number of secrets 2026-08-17 17:07:23 +08:00
世界 cdb88a33ac Fix version quoting in Apple project update script 2026-08-17 16:03:58 +08:00
世界 077a4a0b54 Fix DHCP DNS server search domain handling 2026-08-12 13:29:01 +08:00
Shtorm e8f6936480 Add license_key support for masque and warp Cloudflare profiles 2026-08-11 23:36:15 +03:00
Shtorm 6126cc2158 Update wireguard 2026-08-11 23:33:38 +03:00
Shtorm 4926a0cb91 Fix unified delay 2026-08-11 23:31:13 +03:00
Shtorm f74146648e Fix xhttp link parsing 2026-08-11 23:30:42 +03:00
世界 b0491faeee Fix default interface monitor stuck on system boot 2026-08-10 23:25:56 +08:00
世界 9fa673d105 Fix oomkiller service stub build 2026-08-10 23:16:04 +08:00
Gavin LuoandGitHub 7ac8e5c0ab Fix reset network 2026-08-10 23:10:24 +08:00
Shtorm b900e3513c Update wireguard 2026-08-10 14:28:56 +03:00
NagaseMinatoandGitHub 65380457b8 Fix tailscale preferred MagicDNS domain matching 2026-08-10 19:11:10 +08:00
efbd84276c Fix FakeIP metadata async save
Co-authored-by: Sway-Chan <nz8r488bbc@privaterelay.appleid.com>
2026-08-10 18:42:27 +08:00
世界 f260e771ea Fix unbounded allocations when reading untrusted binary data 2026-08-10 13:26:42 +08:00
Shtorm dec3f0713f Update sing-box core 2026-08-09 16:32:34 +03:00
Shtorm 21a23d7488 Fix OpenStream dropping connection errors 2026-08-09 15:03:14 +03:00
Shtorm cb664d1a4b Fix DNS Fallback 2026-08-09 15:01:36 +03:00
世界 45ca32dcb9 Bump version 2026-08-09 14:57:01 +08:00
世界 93df3ef612 Fix slow open connection declaring lazy headroom 2026-08-09 13:13:24 +08:00
Shtorm f682ceb8e2 Update packages 2026-08-08 22:56:39 +03:00
Shtorm 545424b86b Fix wireguard 2026-08-08 20:49:55 +03:00
Shtorm 1d10636a5f Fix mieru outbound with fqdn server address 2026-08-08 20:46:52 +03:00
Shtorm 9f34cdb2f8 Fix DefaultGateway 2026-08-08 20:43:13 +03:00
Shtorm da4c532efb Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-08-08 10:33:36 +03:00
Shtorm 97c981764d Add DefaultGateway 2026-08-08 10:33:31 +03:00
Shtorm 3310474137 Fix limiters 2026-08-08 10:11:10 +03:00
Shtorm 6c81ddd00f Fix Wireguard options 2026-08-08 10:11:01 +03:00
Shtorm da50e2969d Fix XHTTP dialing 2026-08-08 10:10:05 +03:00
世界 7afc0aa2ba Update naiveproxy to v150.0.7871.63-1 2026-08-08 11:27:55 +08:00
ShtormandGitHub 1e35987658 Fix typo in Rmux description in README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-08-07 06:33:09 +03:00
ShtormandGitHub 44c9c36c65 Fix typo
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-08-06 17:14:08 +03:00
Shtorm 00d3ed46bf Resolve conflicts 2026-08-06 14:20:09 +03:00
Shtorm d6b9f693c4 Add call protocol, Rmux. Update AmneziaWG. Fixes and improvements 2026-08-06 14:19:34 +03:00
Shtorm 051e928b01 Update sing-box core 2026-08-06 14:09:46 +03:00
ShtormandGitHub b644e671c2 Fix typo in VPN description in README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-08-05 09:31:26 +03:00
Ofek LevandGitHub 4c02326989 Fix route_address_set duplicated IP sets causing route creation failure 2026-08-05 14:13:43 +08:00
世界 af40956e58 Update sing 2026-08-04 22:50:40 +08:00
世界 3b22615aec tailscale: Match bare hostnames in preferred_by when search domains exist
MagicDNS resolves single-label names via tailnet search domains, so
route preferred_by should treat them as tailscale domains, matching
official client behavior.
2026-08-04 22:29:14 +08:00
世界 cc1c891400 tailscale: Fix preferred_by matching all addresses with exit node
Exit node peers carry default routes (0.0.0.0/0, ::/0) in their allowed
IPs, so including them in routePrefixes made PreferredAddress report
every address as preferred.
2026-08-04 22:17:04 +08:00
世界 3d85cbd7f0 tailscale: Fix handle peer DNS query 2026-08-04 21:08:00 +08:00
世界 17ec3c71af Bump version 2026-08-03 19:19:51 +08:00
世界 6849e26ee7 tailscale: Fix system interface network category on Windows 2026-08-03 18:59:23 +08:00
世界 fd7cd31d21 Fix tailscale DNS transport missing DNS-only netmap updates 2026-08-03 18:59:23 +08:00
世界 d763884442 Fix tailscale panic with IP control URL 2026-08-03 18:59:23 +08:00
a29b4ea1e8 Fix AnyTLS URLTest results
Co-authored-by: makt28 <makt28@users.noreply.github.com>
2026-08-03 18:59:23 +08:00
ShtormandGitHub 4d0eedd474 Merge pull request #124 from anzix/extended-anytls-parser
feat(parser): Adding support parsing AnyTLS outbound
2026-08-03 07:47:44 +03:00
世界 256d42ad18 Update sing-quic 2026-08-03 12:33:48 +08:00
世界 cb88d94d6d Remove client metadata from AnyTLS requests by default 2026-08-03 12:33:41 +08:00
anzix 2979fe6e7f feat(parser): update README.md to mention AnyTLS 2026-08-01 12:42:14 +05:00
anzix a22671d7c4 feat(parser): update the parsing documentation for provider 2026-08-01 12:14:50 +05:00
anzix 1dd63d4dcb feat(parser): update the parsing documentation 2026-08-01 11:47:12 +05:00
anzix 9d1745d29d feat(parser): adding support AnyTLS 2026-08-01 10:57:04 +05:00
世界 7da573f187 direct: Fix routing loop to exact TUN address on darwin 2026-07-31 11:04:35 +08:00
世界 9d103249e2 release: Fix rpm package format with rpm 6 2026-07-29 21:43:54 +08:00
世界 3708fa1876 Bump version 2026-07-29 19:17:31 +08:00
世界 dba80e614e Fix local DNS transport blocking on canceled queries 2026-07-29 19:17:00 +08:00
世界 c8f76760be Update sing-tun 2026-07-27 23:13:10 +08:00
世界 c9e81856e5 Update sing 2026-07-27 17:32:54 +08:00
世界 9791fa52fb release: Backport workflow refactor 2026-07-27 16:18:06 +08:00
世界 62cc3959b9 Update Go to 1.25.12 2026-07-27 16:18:06 +08:00
世界 1533244d34 Fix UDP message ownership 2026-07-27 15:51:12 +08:00
世界 890544e88b Fix rule-set file descriptor leak 2026-07-27 15:51:12 +08:00
世界 51531186d0 Strip EDNS padding from upstream DNS responses 2026-07-27 15:51:12 +08:00
世界 513910462e Fix DNS route suffix matching 2026-07-27 15:51:12 +08:00
世界 1f1d6d9a87 Fix string type 2026-07-27 15:51:12 +08:00
世界 cb0051d64d Fix inconsistent URLTest results 2026-07-27 15:51:12 +08:00
世界 397fb4d20a dns: Fix search domain expansion
DHCP option 119/15 and resolved link domains are not rooted, so appending
them to the query name produced a non-FQDN name, failing to pack with
"domain must be fully qualified".
2026-07-27 15:51:12 +08:00
世界 67a600dbfb Fix derp stun options 2026-07-27 15:51:12 +08:00
世界 9d7e9b9562 Fix Tailscale 4via6 subnet routing 2026-07-27 15:51:12 +08:00
H-TTTTTand世界 3c4a5a6ed3 Fix naive HTTP/2 connections 2026-07-27 15:51:12 +08:00
世界 d72f0ec1c7 Fix tailscale version 2026-07-27 15:51:12 +08:00
世界 79bc79eeef Fix missing tun logger 2026-07-27 15:51:12 +08:00
世界 c8c41c2038 dialer: Fix auto_detect_interface for UDP connections 2026-07-27 15:51:12 +08:00
世界 4056231e5c Fix tailscale dns 2026-07-27 15:51:12 +08:00
世界 ee808c46be process: Fix panic when package manager is unavailable on Android 2026-07-27 15:51:12 +08:00
世界 7b9439f761 route: Refetch rule-set when cache restore fails 2026-07-27 15:51:12 +08:00
世界 dcfdd8a184 dns: Fix DHCP reset 2026-07-27 15:51:12 +08:00
世界 dc4ca85cbb Fix tailscale start dependencies 2026-07-27 15:51:12 +08:00
世界 61ede421b4 Fix stderr deprecated manager 2026-07-27 15:51:12 +08:00
世界 cb74ad78de Fix naive slow open 2026-07-27 15:51:12 +08:00
世界 b6e554e4c0 Fix ACME HTTP-01 challenge for IPv6 literal addresses 2026-07-27 15:51:12 +08:00
世界 95f2d6302f Update sing-shadowtls to v0.2.1 2026-07-27 15:50:40 +08:00
世界 0df408d807 Update sing-tun 2026-07-27 15:50:40 +08:00
世界 abdaa55e17 Update sing 2026-07-27 15:50:40 +08:00
Shtorm c243a5b6e5 Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-07-25 21:18:16 +03:00
Shtorm b4ec688f1a Fix MASQUE endpoint parsing 2026-07-25 21:17:48 +03:00
Shtorm 2e083b2d8f Update sing-vmess 2026-07-25 21:16:01 +03:00
ShtormandGitHub 909f19640c Add Dial Fields comment to client.json
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-07-24 15:59:49 +03:00
ShtormandGitHub a79e16c03c Merge pull request #118 from embogomolov/fix/interrupt-group-deadlock-extended
common/interrupt: close connections outside group lock
2026-07-22 14:22:08 +03:00
embogomolov d2805ffcc9 common/interrupt: close connections outside group lock 2026-07-22 14:09:56 +03:00
ShtormandGitHub 7c19b660b4 Merge pull request #116 from embogomolov/fix/xhttp-h3-udp-socket-leak
transport/v2rayxhttp: close UDP connection when HTTP/3 dial fails
2026-07-22 13:35:15 +03:00
embogomolov 33907d2e23 transport/v2rayxhttp: close UDP connection when HTTP/3 dial fails 2026-07-22 11:41:41 +03:00
Shtorm ea48501b1d Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-07-18 16:40:41 +03:00
Shtorm ff11f007ec Enable naive proxy build in Docker image 2026-07-18 16:40:15 +03:00
Shtorm dc4170ad6b Fix GroupCommonOption 2026-07-18 16:40:04 +03:00
Shtorm 03f2be2ee6 Fix MTProxy 2026-07-18 14:21:25 +03:00
Shtorm 6941854ce2 Fix XHTTP 2026-07-18 14:21:06 +03:00
Shtorm 09d2dca3c3 Fix TrustTunnel 2026-07-18 14:20:38 +03:00
ShtormandGitHub 425bfaf779 Update Telegram badge to include logo
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-07-17 16:58:08 +03:00
Shtorm df39546485 Merge commit 'b19e232df23e115ab99b9a797f8d5c28dfce6809' into extended 2026-07-16 11:17:27 +03:00
Shtorm 4624fd51b1 Fixes and improvements 2026-07-16 11:16:10 +03:00
世界 7067276170 Fix quic-go write leak 2026-07-09 11:07:27 +08:00
ShtormandGitHub b19e232df2 Merge pull request #105 from Arsolitt/feat/provider-custom-headers
feat(provider): add custom HTTP headers support for remote providers
2026-07-03 09:52:06 +03:00
世界 0f1763877c Fix v2rayhttp upgrade leak 2026-07-03 12:28:39 +08:00
Arsolitt 1e826a201d feat(provider): add custom HTTP headers support for remote providers
Some subscription panels (e.g. Remnawave with incy/happ integration)
require device-identification headers to return the real server list
instead of a dummy config. Add a 'headers' field to the remote provider
options so users can attach arbitrary HTTP headers to subscription
fetch requests.

Signed-off-by: Arsolitt <arsolitt@gmail.com>
2026-07-01 21:58:01 +03:00
ShtormandGitHub a27453e4f7 Merge pull request #97 from v14d4n/feat/masque-configurable-sni
Make masque TLS SNI configurable via server_name
2026-06-26 14:39:20 +03:00
Shtorm 2a77348470 Update README.md 2026-06-26 04:04:01 +03:00
Shtorm 1ae82a483a Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-06-26 03:51:16 +03:00
Shtorm 93e34d124b Merge tag 'v1.13.14' into extended
Integrate upstream sing-box v1.13.14 (18 commits, v1.13.12..v1.13.14).

Conflict resolutions:
- Makefile: keep fork's upload_android (no otherLegacy, codeberg-release.sh),
  add upstream's SFA-version-metadata.json step.
- go.sum: regenerated via go mod tidy from merged go.mod.
- transport/wireguard/endpoint_options.go: keep fork fields, add ICMPTimeout.
- clients/android, clients/apple: keep fork's submodule pointers.
2026-06-26 01:28:40 +03:00
Shtorm edf38d33d6 Add Snell protocol. Refactor MASQUE HTTP/2, Fair Queue. Update XHTTP, OpenVPN, Sudoku, Fallback. Fixes 2026-06-26 01:25:57 +03:00
ShtormandGitHub 31acf60eca Fix examples
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-06-25 15:54:57 +03:00
世界 25a600db24 Bump version 2026-06-25 16:36:07 +08:00
世界 ef2a012301 Fix http proxy authentication 2026-06-25 16:13:35 +08:00
v14d4n 7bfad732e2 feat(masque): make TLS SNI configurable via server_name
MASQUE outbound previously hardcoded the TLS SNI to consumer-masque.cloudflareclient.com. Add a server_name field to the MASQUE outbound TLS options. When empty it falls back to the existing default (cloudflare.ConnectSNI), so existing configs are unaffected.
2026-06-22 14:12:40 +04:00
世界 0b7ffbaafa tun: Fix system stack TCP NAT collision & route address set polluted by appended default element 2026-06-20 22:17:44 +08:00
世界 6bae28b771 cronet: Fix arm build 2026-06-20 22:16:37 +08:00
世界 72a8723e13 Fix DNS query loopback deadlock from shared dedup lock 2026-06-20 20:36:19 +08:00
世界 4e1af0600b Fix UDP sniff fragment timeout treated as fatal error 2026-06-20 19:45:36 +08:00
世界 6397675574 Fix clash log API not respecting subscribed level 2026-06-20 19:27:17 +08:00
世界 7d847c0583 Fix check vless packet encoding 2026-06-19 23:27:29 +08:00
世界 8f006316b2 Fix sing-mux udp write 2026-06-19 21:56:40 +08:00
世界 627912a788 Fix naive inbound QUIC ALPN race condition 2026-06-19 20:57:18 +08:00
ShtormandGitHub 2cbc7691f0 Update Telegram badge from channel to chat
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-06-15 10:43:03 +03:00
Shtorm d174962a04 Add profiler 2026-06-10 16:49:01 +03:00
Shtorm 9c80cf371c Fix openwrt build 2026-06-07 09:12:26 +03:00
Shtorm 9f5ccf43d4 Add SSH inbound, log level. Update MTPROXY. Fixes 2026-06-07 07:59:43 +03:00
Shtorm 6f6af8e902 Fix examples 2026-06-05 00:51:50 +03:00
Shtorm 6cddffd546 provider: replace flag emojis with country codes in removeEmojisFromTags 2026-06-05 00:28:09 +03:00
Shtorm a59e9ec9e3 Fix TrustTunnel 2026-06-04 10:57:08 +03:00
Shtorm 9ebec50a72 Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-06-04 10:12:06 +03:00
Shtorm 9ff7a84afe Refactor TrustTunnel 2026-06-04 10:03:20 +03:00
ShtormandGitHub 7a0354699a Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-06-04 08:22:24 +03:00
Shtorm 978b951169 Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-06-04 08:20:58 +03:00
Shtorm e363c2ff78 Add Mieru inbound, refactor sudoku. Fixes 2026-06-04 07:54:26 +03:00
ShtormandGitHub 0577c28120 Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-06-04 04:36:45 +03:00
Shtorm 195a33379d Add OpenVPN, TrustTunnel, Sudoku, inbound managers. Fixes 2026-06-04 01:47:50 +03:00
世界 78b2e12fbd Bump version 2026-06-03 16:33:44 +08:00
世界 0f4d38bf6c release: Fix extract-lib 2026-06-03 16:33:34 +08:00
世界 e03346c671 Update Go to 1.25.10 2026-06-03 12:56:36 +08:00
世界 fca766704a release: Fix android build 2026-06-03 12:56:36 +08:00
世界 da0cd68115 Fix ping timeout 2026-06-03 12:56:36 +08:00
世界 3d4616746c tailscale: Use upstream version format 2026-06-03 12:56:36 +08:00
世界 90522ddcb9 release: Fix upload_android 2026-06-03 12:56:36 +08:00
世界 761b7f4e12 Handle TUN loopback in direct outbound 2026-06-03 12:56:36 +08:00
Shtorm 9b3da79c32 Update wireguard 2026-05-31 02:07:13 +03:00
Shtorm 4f532b8426 Fix naivebuild 2026-05-30 20:34:17 +03:00
Shtorm a28ab15feb Add codeberg release pipeline 2026-05-30 01:01:18 +03:00
Shtorm 05b86282a5 Add naiveproxy build 2026-05-29 23:11:38 +03:00
Shtorm c8f1667270 Fix xmux 2026-05-29 19:30:34 +03:00
Shtorm e61cf3ccfb Fix wireguard bind 2026-05-29 15:39:53 +03:00
Shtorm a44631607d Disable Wireguard ICMP 2026-05-29 15:31:29 +03:00
Shtorm d61694a1a8 Merge tag 'v1.13.12-extended-2.1.3' into extended 2026-05-29 14:41:56 +03:00
Shtorm 9f89dcf4e0 Remove reserved 2026-05-29 14:34:11 +03:00
Shtorm 0b98a5c126 Update release pipeline 2026-05-29 04:38:59 +03:00
Shtorm 88f7f88f3f Update wireguard 2026-05-29 03:55:48 +03:00
Shtorm 7c72d2d866 Resolve conflicts 2026-05-29 01:33:34 +03:00
Shtorm b953954b60 Update sing-box core, refactor MASQUE, update XHTTP 2026-05-29 01:31:57 +03:00
世界 1086ab2563 Bump version 1.13.12 2026-05-14 15:11:09 +08:00
世界 0baff42864 Bump version 1.13.12 2026-05-14 15:11:09 +08:00
世界 2b995ea10a Run lint for all platforms in workflow 2026-05-13 23:39:27 +08:00
世界 5e0b32460a Run lint for all platforms in workflow 2026-05-13 23:39:27 +08:00
世界 5e7fd7ad78 Fix lint errors 2026-05-13 23:39:27 +08:00
世界 a47f39fa2b Fix lint errors 2026-05-13 23:39:27 +08:00
世界 338aa551d1 Update golangci-lint configuration 2026-05-13 16:38:08 +08:00
世界 429182a349 Update golangci-lint configuration 2026-05-13 16:38:08 +08:00
世界 b6f7d62bb6 sing: Update contextjson 2026-05-13 16:28:50 +08:00
世界 ad8cd9a5a3 sing: Update contextjson 2026-05-13 16:28:50 +08:00
世界 76880eb46b Update naiveproxy to v148.0.7778.96-1 2026-05-13 16:28:49 +08:00
世界 600693e8af Update naiveproxy to v148.0.7778.96-1 2026-05-13 16:28:49 +08:00
世界 b4c625543a Fix tailscale crash at start 2026-05-13 16:28:49 +08:00
世界 3fc0501424 Fix tailscale crash at start 2026-05-13 16:28:49 +08:00
世界 2f139af2d1 Fix naive inbound close 2026-05-13 16:28:49 +08:00
世界 115f859cc7 Fix naive inbound close 2026-05-13 16:28:49 +08:00
世界 383a1824c1 dns: Refactor reordered pool 2026-05-13 16:28:49 +08:00
世界 412c996322 dns: Refactor reordered pool 2026-05-13 16:28:49 +08:00
世界 d166f0da8b dns: Fix conn pool leak 2026-05-13 16:28:49 +08:00
世界 e31b5fac0e dns: Fix conn pool leak 2026-05-13 16:28:49 +08:00
世界 6475a5e036 Skip kickWriteHandshake for server first protocols 2026-05-13 16:28:49 +08:00
世界 e52a4b8d7d Skip kickWriteHandshake for server first protocols 2026-05-13 16:28:49 +08:00
世界 6548c17110 dns: Fix deadline 2026-05-13 16:28:49 +08:00
世界 8214f98ceb dns: Fix deadline 2026-05-13 16:28:49 +08:00
世界 d1c53d21fe release: Add replace_macos_standalone make target 2026-05-13 13:37:40 +08:00
世界 470866935e release: Add replace_macos_standalone make target 2026-05-13 13:37:40 +08:00
Shtorm 1cb7950810 Remove unused file 2026-05-11 02:18:20 +03:00
Shtorm 34b09a8ef3 Add new admin panel, failover, dns fallback, providers, limiters. Update XHTTP 2026-05-11 00:59:35 +03:00
Shtorm 764ae8107c Fix go.sum 2026-05-05 12:59:07 +03:00
Shtorm 15a197a69e Fix legacy build 2026-05-05 12:58:01 +03:00
Shtorm 98a31e153c Fix examples 2026-05-03 04:14:59 +03:00
Shtorm 5b6e493605 Remove IPBlocklist and IPAllowlist 2026-05-03 04:04:16 +03:00
Shtorm b7f6d7dad9 Fix Dockerfile 2026-05-02 15:27:46 +03:00
Shtorm 14af370487 Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-05-02 15:00:57 +03:00
Shtorm 3c6083e56a Fix creating config for WARP 2026-05-02 14:54:26 +03:00
ShtormandGitHub 0ea10ad7ad Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-04-30 23:39:22 +03:00
Shtorm d9e871e60e Disable Wireguard ICMP 2026-04-30 19:20:23 +03:00
Shtorm 851ac2322e Fix OverrideGateway 2026-04-30 19:19:40 +03:00
Shtorm ab21560d09 Update chi 2026-04-30 19:18:50 +03:00
Shtorm 7c4a7e8921 Fix examples 2026-04-30 13:20:45 +03:00
Shtorm 50a4c51a4f Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-04-30 13:14:37 +03:00
Shtorm 088ed5452e Update examples 2026-04-30 13:14:17 +03:00
Shtorm 48d6ef6607 Update android build tags 2026-04-30 12:17:37 +03:00
ShtormandGitHub afa89b6c3e Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-04-30 11:15:15 +03:00
ShtormandGitHub 5ea6af2dd2 Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-04-30 01:15:21 +03:00
ShtormandGitHub 616e654d05 Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-04-30 01:12:28 +03:00
ShtormandGitHub d1ce692c09 Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-04-30 01:08:36 +03:00
Shtorm b0bf6bb96a Update README.md 2026-04-29 22:40:15 +03:00
Shtorm 87a4ce5552 Fix go.mod 2026-04-29 22:16:10 +03:00
Shtorm 0487a96b04 Resolve conflicts 2026-04-29 22:14:30 +03:00
Shtorm c307b8dc2d Add MTProxy, MASQUE, VPN, Link parser. Update AmneziaWG. Remove Tunneling 2026-04-29 22:11:30 +03:00
世界 ddb757a25c Reduce built-in certificate store memory 2026-04-28 07:44:20 +08:00
世界 0d774d32d6 Reduce built-in certificate store memory 2026-04-28 07:44:20 +08:00
Shtorm 680a91e12a Fix README.md 2026-04-27 11:38:09 +03:00
Shtorm 2550983998 Update tailscale 2026-04-26 21:31:13 +03:00
Shtorm 7c3a19c2fe Update sing-box core 2026-04-26 21:11:31 +03:00
世界 553cfa1f9f Bump version 2026-04-23 07:30:34 +08:00
世界 74cbcd3723 Bump version 2026-04-23 07:30:34 +08:00
世界 f102ef1d94 Fix process search skipped for Android again 2026-04-23 05:52:22 +08:00
世界 9306f69bc0 Fix process search skipped for Android again 2026-04-23 05:52:22 +08:00
世界 3312b8da50 Clean up DNS transports 2026-04-23 02:30:32 +08:00
世界 ead1b6688f Clean up DNS transports 2026-04-23 02:30:32 +08:00
Shtorm 614af37bc4 Update sing-box core 2026-04-22 19:23:23 +03:00
世界 a3fc14f35f Bump version 2026-04-22 13:40:36 +08:00
世界 65dedd3a6f Bump version 2026-04-22 13:40:36 +08:00
世界 8947cb243e sing: Fix UoT write race 2026-04-21 18:54:52 +08:00
世界 782c46be29 sing: Fix UoT write race 2026-04-21 18:54:52 +08:00
世界 83d3a6d4e1 Hide lifecycle logs for fast operations 2026-04-21 17:15:16 +08:00
世界 f9bfa850c4 Hide lifecycle logs for fast operations 2026-04-21 17:15:16 +08:00
世界 71f6a2ab4e Fix process search skipped for TUN 2026-04-21 15:45:05 +08:00
世界 8b64ae650b Fix process search skipped for TUN 2026-04-21 15:45:05 +08:00
世界 d942ecc904 Bump version 1.13.9 2026-04-20 09:49:39 +08:00
世界 94a3e293fd Bump version 1.13.9 2026-04-20 09:49:39 +08:00
世界 c3de6a25fb documentation: Remove warp ads 2026-04-20 09:49:39 +08:00
世界 24610b61c5 documentation: Remove warp ads 2026-04-20 09:49:39 +08:00
世界 b3523abad5 tun: Fix multi include/exclude interfaces 2026-04-20 09:49:39 +08:00
世界 97af29dc6f tun: Fix multi include/exclude interfaces 2026-04-20 09:49:39 +08:00
世界 60dd7ea5c9 Simplify lifecycle logs 2026-04-20 09:49:39 +08:00
世界 d395680ca2 Simplify lifecycle logs 2026-04-20 09:49:39 +08:00
世界 e4bc459975 Skip process search for non-local source addresses 2026-04-20 09:49:39 +08:00
世界 9ba5a05020 Skip process search for non-local source addresses 2026-04-20 09:49:39 +08:00
世界 3124cdd661 Fix windows bssid matching 2026-04-20 09:49:39 +08:00
世界 9cfb117903 Fix windows bssid matching 2026-04-20 09:49:39 +08:00
世界 b3606e33a6 release: fix apk package file ownership 2026-04-20 09:49:39 +08:00
世界 2d8843103d release: fix apk package file ownership 2026-04-20 09:49:39 +08:00
世界 9b72b352d5 sing: Fix UoT connect race 2026-04-20 00:10:46 +08:00
世界 9d7812fbf1 sing: Fix UoT connect race 2026-04-20 00:10:46 +08:00
世界 fb61987d93 tun: memmod: be more resilient toward weird PE files 2026-04-19 21:54:20 +08:00
世界 7ee7a267b2 tun: memmod: be more resilient toward weird PE files 2026-04-19 21:54:20 +08:00
世界 a80ef94f09 Fix tailscale endpoint early-start close panic 2026-04-19 21:15:54 +08:00
世界 e974da41aa Fix tailscale endpoint early-start close panic 2026-04-19 21:15:54 +08:00
世界 3a236d9c3c fswatch: Fix close 2026-04-19 20:41:33 +08:00
世界 d58386fd12 fswatch: Fix close 2026-04-19 20:41:33 +08:00
世界 ca76c56377 daemon: Fix registry leak 2026-04-19 20:39:38 +08:00
世界 6c1ff4a8c1 daemon: Fix registry leak 2026-04-19 20:39:38 +08:00
世界 0bd109d7bc sing: Fix interface finder 2026-04-19 20:38:52 +08:00
世界 9e6924a3f3 sing: Fix interface finder 2026-04-19 20:38:52 +08:00
Shtorm 55a3a1e594 Update sing-box core 2026-04-17 01:10:31 +03:00
世界 9b155ba467 Fix rdrc cache 2026-04-16 16:45:50 +08:00
世界 ea5896ed91 Fix rdrc cache 2026-04-16 16:45:50 +08:00
世界 7ed5ef6da4 sing: Fix udpnat2 timeout 2026-04-16 16:45:38 +08:00
世界 1de293eb14 sing: Fix udpnat2 timeout 2026-04-16 16:45:38 +08:00
世界 bb3ad9c694 documentation: Fix typo 2026-04-14 16:00:47 +08:00
世界 7f44f908d9 documentation: Fix typo 2026-04-14 16:00:47 +08:00
世界 39bfb37b83 Bump version 2026-04-14 14:33:19 +08:00
世界 d5adb54bc6 Bump version 2026-04-14 14:33:19 +08:00
世界 0438de610f Update Go to 1.25.9 2026-04-14 14:26:59 +08:00
世界 1cfcea769f Update Go to 1.25.9 2026-04-14 14:26:59 +08:00
世界 acd176ca95 Update naiveproxy to v147.0.7727.49-1 2026-04-14 14:24:21 +08:00
世界 f43fc797d4 Update naiveproxy to v147.0.7727.49-1 2026-04-14 14:24:21 +08:00
世界 32f91a4faa Fix FakeIP returning error for unconfigured address family
Return SUCCESS with empty answers instead of an error when the
queried address family has no range configured. Reject configurations
where neither inet4_range nor inet6_range is set.
2026-04-14 14:15:20 +08:00
世界 8e3176b789 Fix FakeIP returning error for unconfigured address family
Return SUCCESS with empty answers instead of an error when the
queried address family has no range configured. Reject configurations
where neither inet4_range nor inet6_range is set.
2026-04-14 14:15:20 +08:00
世界 41b2d51390 Bump version 2026-04-10 16:23:45 +08:00
世界 025b947a24 Bump version 2026-04-10 16:23:45 +08:00
世界 ff1b4bfcc9 tun: Fixes 2026-04-10 14:13:06 +08:00
世界 76fa3c2e5e tun: Fixes 2026-04-10 14:13:06 +08:00
世界 a3ebacd17c Fix tailscale crash 2026-04-10 14:09:03 +08:00
世界 53db1f178c Fix tailscale crash 2026-04-10 14:09:03 +08:00
世界 b38cf87444 Fix local DNS server for Android 2026-04-10 14:08:57 +08:00
世界 55ec8abf17 Fix local DNS server for Android 2026-04-10 14:08:57 +08:00
Berkay Özdemirciand世界 0b8746a133 Fix EDNS OPT record corruption in DNS cache
The TTL computation and assignment loops treat OPT record's Hdr.Ttl
as a regular TTL, but per RFC 6891 it encodes EDNS0 metadata
(ExtRCode|Version|Flags). This corrupts cached responses causing
systemd-resolved to reject them with EDNS version 255.

Also fix pointer aliasing: storeCache() stored raw *dns.Msg pointer
so subsequent mutations by Exchange() corrupted cached data.

- Skip OPT records in all TTL loops (Exchange + loadResponse)
- Use message.Copy() in storeCache() to isolate cache from mutations
2026-04-10 14:08:24 +08:00
Berkay Özdemirciand世界 5a957fd750 Fix EDNS OPT record corruption in DNS cache
The TTL computation and assignment loops treat OPT record's Hdr.Ttl
as a regular TTL, but per RFC 6891 it encodes EDNS0 metadata
(ExtRCode|Version|Flags). This corrupts cached responses causing
systemd-resolved to reject them with EDNS version 255.

Also fix pointer aliasing: storeCache() stored raw *dns.Msg pointer
so subsequent mutations by Exchange() corrupted cached data.

- Skip OPT records in all TTL loops (Exchange + loadResponse)
- Use message.Copy() in storeCache() to isolate cache from mutations
2026-04-10 14:08:24 +08:00
TargetLockedandGitHub 2b1f475b3f Fix disable tcp keep alive 2026-04-10 13:29:15 +08:00
TargetLockedandGitHub 7c3d8cf8db Fix disable tcp keep alive 2026-04-10 13:29:15 +08:00
Shtorm 9bb1b847be Update sing-box core 2026-04-06 20:54:24 +03:00
世界 0b42a02292 Bump version 2026-04-06 23:09:11 +08:00
世界 813b634d08 Bump version 2026-04-06 23:09:11 +08:00
hdroverand世界 4a2aac6bc9 Fix naive inbound padding bytes 2026-04-06 22:33:11 +08:00
hdroverand世界 d9b435fb62 Fix naive inbound padding bytes 2026-04-06 22:33:11 +08:00
世界 6c430555aa sing: Fix vectorised readv iovec length calculation
This does not seem to affect any actual paths in the sing-box.
2026-04-01 16:16:58 +08:00
世界 354b4b040e sing: Fix vectorised readv iovec length calculation
This does not seem to affect any actual paths in the sing-box.
2026-04-01 16:16:58 +08:00
世界 c782f63849 Bump version 2026-03-30 23:03:43 +08:00
世界 7ffdc48b49 Bump version 2026-03-30 23:03:43 +08:00
世界 c5fa529f27 sing: Minor fixes 2026-03-30 22:58:11 +08:00
世界 e15bdf11eb sing: Minor fixes 2026-03-30 22:58:11 +08:00
世界 af60ef7647 platform: Add HTTPResponse.WriteToWithProgress 2026-03-30 22:42:36 +08:00
世界 e3bcb06c3e platform: Add HTTPResponse.WriteToWithProgress 2026-03-30 22:42:36 +08:00
世界 4a8ef9d5cb quic: Fix protocol client close & Sync hysteria bbr fix 2026-03-30 22:42:36 +08:00
世界 84d2280960 quic: Fix protocol client close & Sync hysteria bbr fix 2026-03-30 22:42:36 +08:00
世界 5042967836 Fix naive quic error message 2026-03-30 22:42:36 +08:00
世界 4fd2532b0a Fix naive quic error message 2026-03-30 22:42:36 +08:00
a19b3a6971 fix(rpm): add vendor field to fpm config to avoid (none) vendor
Co-authored-by: Hyper <hypar@disroot.org>
2026-03-30 22:09:54 +08:00
02ccde6c71 fix(rpm): add vendor field to fpm config to avoid (none) vendor
Co-authored-by: Hyper <hypar@disroot.org>
2026-03-30 22:09:54 +08:00
世界 8cc97afac4 Fix WireGuard shutdown race crashing
Stop peer goroutines before closing the TUN device to prevent
RoutineSequentialReceiver from calling Write on a nil dispatcher.
2026-03-26 16:33:21 +08:00
世界 e98b4ad449 Fix WireGuard shutdown race crashing
Stop peer goroutines before closing the TUN device to prevent
RoutineSequentialReceiver from calling Write on a nil dispatcher.
2026-03-26 16:33:21 +08:00
世界 a8064cf7cd Bump version 2026-03-26 13:28:33 +08:00
世界 d09182614c Bump version 2026-03-26 13:28:33 +08:00
世界 75f64acd9f route: Fix query_type never matching in rule_set headless rules 2026-03-26 13:26:18 +08:00
世界 6381de7bab route: Fix query_type never matching in rule_set headless rules 2026-03-26 13:26:18 +08:00
世界 fdfd0ffb07 route: merge rule_set branches into outer rules
Treat rule_set items as merged branches instead of standalone boolean
sub-items.

Evaluate each branch inside a referenced rule-set as if it were merged
into the outer rule and keep OR semantics between branches. This lets
outer grouped fields satisfy matching groups inside a branch without
introducing a standalone outer fallback or cross-branch state union.

Keep inherited grouped state outside inverted default and logical
branches. Negated rule-set branches now evaluate !(...) against their
own conditions and only reapply the outer grouped match after negation
succeeds, so configs like outer-group && !inner-condition continue to
work.

Add regression tests for same-group merged matches, cross-group and
extra-AND failures, DNS merged-branch behaviour, and inverted merged
branches. Update the route and DNS rule docs to clarify that rule-set
branches merge into the outer rule while keeping OR semantics between
branches.
2026-03-25 14:00:29 +08:00
世界 b0c6762bc1 route: merge rule_set branches into outer rules
Treat rule_set items as merged branches instead of standalone boolean
sub-items.

Evaluate each branch inside a referenced rule-set as if it were merged
into the outer rule and keep OR semantics between branches. This lets
outer grouped fields satisfy matching groups inside a branch without
introducing a standalone outer fallback or cross-branch state union.

Keep inherited grouped state outside inverted default and logical
branches. Negated rule-set branches now evaluate !(...) against their
own conditions and only reapply the outer grouped match after negation
succeeds, so configs like outer-group && !inner-condition continue to
work.

Add regression tests for same-group merged matches, cross-group and
extra-AND failures, DNS merged-branch behaviour, and inverted merged
branches. Update the route and DNS rule docs to clarify that rule-set
branches merge into the outer rule while keeping OR semantics between
branches.
2026-03-25 14:00:29 +08:00
世界 fcdea284e1 release: Refactor release tracks for Linux packages and Docker
Support 4 release tracks instead of 2:
- sing-box / latest (stable release)
- sing-box-beta / latest-beta (stable pre-release)
- sing-box-testing / latest-testing (testing branch)
- sing-box-oldstable / latest-oldstable (oldstable branch)

Track is detected via git branch --contains and git tag,
replacing the old version-string hyphen check.
2026-03-24 15:03:43 +08:00
世界 7425100bac release: Refactor release tracks for Linux packages and Docker
Support 4 release tracks instead of 2:
- sing-box / latest (stable release)
- sing-box-beta / latest-beta (stable pre-release)
- sing-box-testing / latest-testing (testing branch)
- sing-box-oldstable / latest-oldstable (oldstable branch)

Track is detected via git branch --contains and git tag,
replacing the old version-string hyphen check.
2026-03-24 15:03:43 +08:00
世界 3564cdf07e route: formalize nested rule_set group-state semantics
Before 8bf01b7ad, nested rule-set evaluation reused the parent rule
match cache. In practice, this meant these fields leaked across nested
evaluation:

- SourceAddressMatch
- SourcePortMatch
- DestinationAddressMatch
- DestinationPortMatch
- DidMatch

That leak had two opposite effects.

First, it made included rule-sets partially behave like the docs'
"merged" semantics. For example, if an outer route rule had:

  rule_set = ["geosite-additional-!cn"]
  ip_cidr  = 104.26.10.0/24

and the inline rule-set matched `domain_suffix = speedtest.net`, the
inner match could set `DestinationAddressMatch = true` and the outer
rule would then pass its destination-address group check. This is why
some `rule_set + ip_cidr` combinations used to work.

But the same leak also polluted sibling rules and sibling rule-sets.
A branch could partially match one group, then fail later, and still
leave that group cache set for the next branch. This broke cases such
as gh-3485: with `rule_set = [test1, test2]`, `test1` could touch
destination-address cache before an AdGuard `@@` exclusion made the
whole branch fail, and `test2` would then run against dirty state.

8bf01b7ad fixed that by cloning metadata for nested rule-set/rule
evaluation and resetting the rule match cache for each branch. That
stopped sibling pollution, but it also removed the only mechanism by
which a successful nested branch could affect the parent rule's grouped
matching state.

As a result, nested rule-sets became pure boolean sub-items against the
outer rule. The previous example stopped working: the inner
`domain_suffix = speedtest.net` still matched, but the outer rule no
longer observed any destination-address-group success, so it fell
through to `final`.

This change makes the semantics explicit instead of relying on cache
side effects:

- `rule_set: ["a", "b"]` is OR
- rules inside one rule-set are OR
- each nested branch is evaluated in isolation
- failed branches contribute no grouped match state
- a successful branch contributes its grouped match state back to the
  parent rule
- grouped state from different rule-sets must not be combined together
  to satisfy one outer rule

In other words, rule-sets now behave as "OR branches whose successful
group matches merge into the outer rule", which matches the documented
intent without reintroducing cross-branch cache leakage.
2026-03-24 15:03:43 +08:00
世界 d454aa0fdf route: formalize nested rule_set group-state semantics
Before 795d1c289, nested rule-set evaluation reused the parent rule
match cache. In practice, this meant these fields leaked across nested
evaluation:

- SourceAddressMatch
- SourcePortMatch
- DestinationAddressMatch
- DestinationPortMatch
- DidMatch

That leak had two opposite effects.

First, it made included rule-sets partially behave like the docs'
"merged" semantics. For example, if an outer route rule had:

  rule_set = ["geosite-additional-!cn"]
  ip_cidr  = 104.26.10.0/24

and the inline rule-set matched `domain_suffix = speedtest.net`, the
inner match could set `DestinationAddressMatch = true` and the outer
rule would then pass its destination-address group check. This is why
some `rule_set + ip_cidr` combinations used to work.

But the same leak also polluted sibling rules and sibling rule-sets.
A branch could partially match one group, then fail later, and still
leave that group cache set for the next branch. This broke cases such
as gh-3485: with `rule_set = [test1, test2]`, `test1` could touch
destination-address cache before an AdGuard `@@` exclusion made the
whole branch fail, and `test2` would then run against dirty state.

795d1c289 fixed that by cloning metadata for nested rule-set/rule
evaluation and resetting the rule match cache for each branch. That
stopped sibling pollution, but it also removed the only mechanism by
which a successful nested branch could affect the parent rule's grouped
matching state.

As a result, nested rule-sets became pure boolean sub-items against the
outer rule. The previous example stopped working: the inner
`domain_suffix = speedtest.net` still matched, but the outer rule no
longer observed any destination-address-group success, so it fell
through to `final`.

This change makes the semantics explicit instead of relying on cache
side effects:

- `rule_set: ["a", "b"]` is OR
- rules inside one rule-set are OR
- each nested branch is evaluated in isolation
- failed branches contribute no grouped match state
- a successful branch contributes its grouped match state back to the
  parent rule
- grouped state from different rule-sets must not be combined together
  to satisfy one outer rule

In other words, rule-sets now behave as "OR branches whose successful
group matches merge into the outer rule", which matches the documented
intent without reintroducing cross-branch cache leakage.
2026-03-24 15:03:43 +08:00
世界 38e0832cf4 tun: Fix system stack rewriting TUN subnet destinations to loopback 2026-03-23 19:38:55 +08:00
世界 a3623eb41a tun: Fix system stack rewriting TUN subnet destinations to loopback 2026-03-23 19:38:55 +08:00
世界 fd28e167b9 Fix DNS transport returning error for empty AAAA response
Closes #3925
2026-03-23 19:21:55 +08:00
世界 72bc4c1f87 Fix DNS transport returning error for empty AAAA response
Closes #3925
2026-03-23 19:21:55 +08:00
世界 e5053ffcda Match package_name in process_path rule on Android 2026-03-23 18:57:35 +08:00
世界 9ac1e2ff32 Match package_name in process_path rule on Android 2026-03-23 18:57:35 +08:00
世界 f3a79dda87 Fix package_name shared uid matching 2026-03-23 18:57:35 +08:00
世界 0045103d14 Fix package_name shared uid matching 2026-03-23 18:57:35 +08:00
世界 5eefbbb9ed Optimize Darwin process finder 2026-03-23 18:57:35 +08:00
世界 d2a933784c Optimize Darwin process finder 2026-03-23 18:57:35 +08:00
世界 828c324b18 Optimize Linux process finder 2026-03-23 18:57:35 +08:00
世界 3f05a37f65 Optimize Linux process finder 2026-03-23 18:57:35 +08:00
世界 60c8e40386 Add process information cache to avoid duplicate lookups
PreMatch and full match phases each created a fresh InboundContext,
causing process search (expensive OS syscalls) to run twice per
connection. Use a freelru ShardedLRU cache with 200ms TTL to serve
the second lookup from cache.
2026-03-23 14:26:45 +08:00
世界 b8e5a71450 Add process information cache to avoid duplicate lookups
PreMatch and full match phases each created a fresh InboundContext,
causing process search (expensive OS syscalls) to run twice per
connection. Use a freelru ShardedLRU cache with 200ms TTL to serve
the second lookup from cache.
2026-03-23 14:26:45 +08:00
世界 572b4d3477 tailscale: Only set ProcessLocalIPs/ProcessSubnets for fake TUN 2026-03-23 14:16:40 +08:00
世界 c13faa8e3c tailscale: Only set ProcessLocalIPs/ProcessSubnets for fake TUN 2026-03-23 14:16:40 +08:00
世界 f192904009 Fix DialerForICMPDestination 2026-03-23 13:58:55 +08:00
世界 7623bcd19e Fix DialerForICMPDestination 2026-03-23 13:58:55 +08:00
世界 8bf01b7add Fix nested rule-set match cache isolation 2026-03-23 12:26:19 +08:00
世界 795d1c2892 Fix nested rule-set match cache isolation 2026-03-23 12:26:19 +08:00
世界 fbb51d2cae Reject removed legacy inbound fields instead of silently ignoring 2026-03-21 17:16:10 +08:00
世界 6913b11e0a Reject removed legacy inbound fields instead of silently ignoring 2026-03-21 17:16:10 +08:00
世界 b94b427d8f daemon: Allow StartOrReloadService to recover from FATAL state 2026-03-21 13:37:14 +08:00
世界 1e57c06295 daemon: Allow StartOrReloadService to recover from FATAL state 2026-03-21 13:37:14 +08:00
世界 3df45319a0 daemon: Fix CloseService leaving instance non-nil on close error 2026-03-21 13:23:57 +08:00
世界 ea464cef8d daemon: Fix CloseService leaving instance non-nil on close error 2026-03-21 13:23:57 +08:00
Andrew Novikovand世界 952cce0d8e tun: Fix nfqueue not working in prerouting 2026-03-17 11:05:40 +08:00
Andrew Novikovand世界 a8e3cd3256 tun: Fix nfqueue not working in prerouting 2026-03-17 11:05:40 +08:00
世界 53850e99d4 documentation: Fix Chinese link anchors 2026-03-16 12:24:10 +08:00
世界 686cf1f304 documentation: Fix Chinese link anchors 2026-03-16 12:24:10 +08:00
世界 b0487c6600 documentation: Fix unicode heading anchors 2026-03-16 12:10:32 +08:00
世界 9fbfb87723 documentation: Fix unicode heading anchors 2026-03-16 12:10:32 +08:00
世界 6da6aff8b4 Deprecate Socksaddr.IsFqdn: do not reject potentially valid domain names 2026-03-16 09:37:59 +08:00
世界 d2fa21d07b Deprecate Socksaddr.IsFqdn: do not reject potentially valid domain names 2026-03-16 09:37:59 +08:00
世界 ecbdba3e1e Bump version 2026-03-15 17:56:37 +08:00
世界 d3768cca36 Bump version 2026-03-15 17:56:37 +08:00
世界 baf76d88ad Fix connector canceled dial cleanup 2026-03-15 17:56:37 +08:00
世界 0889ddd001 Fix connector canceled dial cleanup 2026-03-15 17:56:37 +08:00
深鸣and世界 acf3dd8056 documentation: Minor fixes 2026-03-15 17:56:37 +08:00
深鸣and世界 f46fbf188a documentation: Minor fixes 2026-03-15 17:56:37 +08:00
世界 6eff43b36d tun: Fix nftables single include_uid not working 2026-03-15 16:58:34 +08:00
世界 f2d15139f5 tun: Fix nftables single include_uid not working 2026-03-15 16:58:34 +08:00
世界 ea67013cc8 Fix kTLS crash 2026-03-14 21:38:38 +08:00
世界 041646b728 Fix kTLS crash 2026-03-14 21:38:38 +08:00
世界 5764a92e59 tun: Fix "Fix auto_redirect dropping SO_BINDTODEVICE traffic" 2026-03-14 21:38:38 +08:00
世界 b990de2e12 tun: Fix "Fix auto_redirect dropping SO_BINDTODEVICE traffic" 2026-03-14 21:38:38 +08:00
世界 0b388be33c Bump version 2026-03-14 21:38:38 +08:00
世界 fe585157d2 Bump version 2026-03-14 21:38:38 +08:00
世界 2e1cb43042 tun:Fix auto_redirect dropping SO_BINDTODEVICE traffic 2026-03-14 21:38:38 +08:00
世界 eed6a36e5d tun:Fix auto_redirect dropping SO_BINDTODEVICE traffic 2026-03-14 21:38:38 +08:00
世界 e7a770c977 tailscale: Fix system interface rules 2026-03-14 21:38:38 +08:00
世界 eb0f38544c tailscale: Fix system interface rules 2026-03-14 21:38:38 +08:00
Shtorm 797801f527 Update dependencies 2026-03-11 20:10:06 +03:00
Shtorm 3e546b916a Update dependencies 2026-03-11 17:32:12 +03:00
世界 673a11379f platform: Add f-droid update helpers 2026-03-11 20:41:29 +08:00
世界 54468a1a2a platform: Add f-droid update helpers 2026-03-11 20:41:29 +08:00
世界 5b27caa338 Add Alpine APK packaging to CI build
Add fpm-based Alpine APK packaging alongside existing DEB/RPM/Pacman
packages. Alpine APKs use `linux` in the filename to distinguish from
OpenWrt APKs which use the `openwrt` prefix.
2026-03-11 20:41:29 +08:00
世界 8289bbd846 Add Alpine APK packaging to CI build
Add fpm-based Alpine APK packaging alongside existing DEB/RPM/Pacman
packages. Alpine APKs use `linux` in the filename to distinguish from
OpenWrt APKs which use the `openwrt` prefix.
2026-03-11 20:41:29 +08:00
世界 4bd2a359e3 ccm/ocm: Fix missing metering for 1M context and /fast mode
CCM: Fix 1M context detection - use prefix match for versioned
beta strings (e.g. "context-1m-2025-08-07") and include cache
tokens in the 200K threshold check per Anthropic billing docs.

OCM: Add GPT-5.4 family pricing (standard/priority/flex) with
extended context (>272K) premium pricing support. Add context
window tracking to usage combinations, mirroring CCM's pattern.
Update normalizeGPT5Model defaults to latest known models.
2026-03-11 20:41:29 +08:00
世界 49c450d942 ccm/ocm: Fix missing metering for 1M context and /fast mode
CCM: Fix 1M context detection - use prefix match for versioned
beta strings (e.g. "context-1m-2025-08-07") and include cache
tokens in the 200K threshold check per Anthropic billing docs.

OCM: Add GPT-5.4 family pricing (standard/priority/flex) with
extended context (>272K) premium pricing support. Add context
window tracking to usage combinations, mirroring CCM's pattern.
Update normalizeGPT5Model defaults to latest known models.
2026-03-11 20:41:29 +08:00
Shtorm dec3f7847e Update dependencies 2026-03-11 06:45:24 +03:00
世界 b68394bbe2 Fix tailscale connections 2026-03-11 00:27:15 +08:00
世界 a7ee943216 Fix tailscale connections 2026-03-11 00:27:15 +08:00
世界 ab1fb1dce0 documentation: Update ocm/ccm examples 2026-03-10 22:04:12 +08:00
世界 8bb4c4dd32 documentation: Update ocm/ccm examples 2026-03-10 22:04:12 +08:00
世界 0153ec1a69 Fix OCM websocket proxy lifecycle and headers 2026-03-10 22:04:11 +08:00
世界 67621ee6ba Fix OCM websocket proxy lifecycle and headers 2026-03-10 22:04:11 +08:00
世界 b8a398a9a5 ccm/ocm: Add by_user_and_week cost summary 2026-03-10 22:04:11 +08:00
世界 a09ffe6a0f ccm/ocm: Add by_user_and_week cost summary 2026-03-10 22:04:11 +08:00
世界 7388824759 ocm: Add Responses WebSocket API proxy and fix client config docs
Support the OpenAI Responses WebSocket API (`wss://.../v1/responses`)
for bidirectional frame proxying with usage tracking.
Fix Codex CLI client config examples to use profiles and correct flags.

Update openai-go v3.24.0 → v3.26.0.
2026-03-10 22:04:11 +08:00
世界 e0be8743f6 ocm: Add Responses WebSocket API proxy and fix client config docs
Support the OpenAI Responses WebSocket API (`wss://.../v1/responses`)
for bidirectional frame proxying with usage tracking.
Fix Codex CLI client config examples to use profiles and correct flags.

Update openai-go v3.24.0 → v3.26.0.
2026-03-10 22:04:11 +08:00
世界 bbedd5383a tailscaile: Fix using TUN auto redirect with tailscale system interface 2026-03-10 22:04:11 +08:00
世界 0b04528803 tailscaile: Fix using TUN auto redirect with tailscale system interface 2026-03-10 22:04:11 +08:00
世界 45353fbe2c tailscale: Use system dialer for system interface
* Revert "Fix netstack TCP connections with system interface
2026-03-10 19:50:16 +08:00
世界 65875e6dac tailscale: Use system dialer for system interface
* Revert "Fix netstack TCP connections with system interface
2026-03-10 19:50:16 +08:00
Shtorm 0d67ea0413 Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2026-03-10 09:06:57 +03:00
Shtorm c8be4417a6 Resolve conflicts 2026-03-10 08:43:01 +03:00
Shtorm 78057bc9c8 Update dependencies 2026-03-10 08:37:04 +03:00
Shtorm 7c141d4afc Update sing-box core 2026-03-10 04:50:32 +03:00
Shtorm 494fa5a9da Update sing-box core 2026-03-10 04:25:01 +03:00
世界 4984fc05bc Fix legacy DNS client_subnet options not working 2026-03-09 20:18:47 +08:00
世界 4d6fb1d38d Fix legacy DNS client_subnet options not working 2026-03-09 20:18:47 +08:00
世界 0af59a3a0a release: Fix default config 2026-03-09 20:18:43 +08:00
世界 305b930d90 release: Fix default config 2026-03-09 20:18:43 +08:00
世界 bcd9bfa614 release: Add openwrt apk build 2026-03-09 20:18:40 +08:00
世界 bc3884ca91 release: Add openwrt apk build 2026-03-09 20:18:40 +08:00
世界 5ddaf78fdc Fix missing with_gvisor build tag for tailscale 2026-03-09 20:18:28 +08:00
世界 df0bf927e4 Fix missing with_gvisor build tag for tailscale 2026-03-09 20:18:28 +08:00
世界 89f31c6ab2 release: Backport Go 1.25 to macOS 10.13 2026-03-09 20:13:36 +08:00
世界 efe20ea51c release: Backport Go 1.25 to macOS 10.13 2026-03-09 20:13:36 +08:00
世界andtraitman a50f64a6c8 Fix websocket connection and goroutine leaks in Clash API
Co-authored-by: traitman <112139837+traitman@users.noreply.github.com>
2026-03-09 20:06:34 +08:00
世界andtraitman e21a72fcd1 Fix websocket connection and goroutine leaks in Clash API
Co-authored-by: traitman <112139837+traitman@users.noreply.github.com>
2026-03-09 20:06:34 +08:00
世界 999fb83b61 documentation: Update cronet-go descriptions 2026-03-09 20:06:34 +08:00
世界 e1477bd065 documentation: Update cronet-go descriptions 2026-03-09 20:06:34 +08:00
世界 559eb5ed71 Fix local DNS transport CNAME chain broken with systemd-resolved
Replace D-Bus ResolveRecord API with direct raw DNS queries to upstream
servers obtained from systemd-resolved's per-interface link properties.
2026-03-09 20:06:34 +08:00
世界 aa495fce38 Fix local DNS transport CNAME chain broken with systemd-resolved
Replace D-Bus ResolveRecord API with direct raw DNS queries to upstream
servers obtained from systemd-resolved's per-interface link properties.
2026-03-09 20:06:34 +08:00
世界 77edcaf011 tailscale: Fix inbound UDP packet connection 2026-03-09 20:06:34 +08:00
世界 9cd60c28c0 tailscale: Fix inbound UDP packet connection 2026-03-09 20:06:34 +08:00
Heng luand世界 2a1c465d62 Fix netns fd leak in ListenNetworkNamespace 2026-03-09 20:06:34 +08:00
Heng luand世界 2ba896c5ac Fix netns fd leak in ListenNetworkNamespace 2026-03-09 20:06:34 +08:00
Oleg Artyomovand世界 14eb5395b3 service/ccm: strip Accept-Encoding before forwarding to avoid untracked usage
When clients (e.g. Node.js Anthropic SDK) explicitly set Accept-Encoding: gzip,
Go's http.Transport does not transparently decompress the response body, because
it only does so when it added the header itself. This causes CCM's json.Unmarshal
to receive raw gzip bytes, silently failing to parse usage data and leaving the
usage counter unchanged.

Fix: remove Accept-Encoding from the outgoing proxy request. Transport adds it
automatically and transparently decompresses response.Body before CCM reads it.

Wire compression (CCM→Anthropic) is preserved — Transport still negotiates gzip.
Only CCM→localhost path is affected; compression on loopback has no practical
benefit.
2026-03-09 20:06:34 +08:00
Oleg Artyomovand世界 1d388547ee service/ccm: strip Accept-Encoding before forwarding to avoid untracked usage
When clients (e.g. Node.js Anthropic SDK) explicitly set Accept-Encoding: gzip,
Go's http.Transport does not transparently decompress the response body, because
it only does so when it added the header itself. This causes CCM's json.Unmarshal
to receive raw gzip bytes, silently failing to parse usage data and leaving the
usage counter unchanged.

Fix: remove Accept-Encoding from the outgoing proxy request. Transport adds it
automatically and transparently decompresses response.Body before CCM reads it.

Wire compression (CCM→Anthropic) is preserved — Transport still negotiates gzip.
Only CCM→localhost path is affected; compression on loopback has no practical
benefit.
2026-03-09 20:06:34 +08:00
世界 8ef2b826c3 Fix legacy DNS defaults on final transport 2026-03-09 20:06:34 +08:00
世界 e343cec4d5 Fix legacy DNS defaults on final transport 2026-03-09 20:06:34 +08:00
世界 c4bb80d2f0 cronet-go: Fix library search path 2026-03-09 20:06:34 +08:00
世界 d58efc5d01 cronet-go: Fix library search path 2026-03-09 20:06:34 +08:00
世界 5d219a4111 Bump version 2026-03-07 16:13:23 +08:00
世界 4b26ab16fb Bump version 2026-03-07 16:13:23 +08:00
世界 ea9b80dc92 Update Go to 1.25.8 2026-03-07 16:13:23 +08:00
世界 0e27312eda Update Go to 1.25.8 2026-03-07 16:13:23 +08:00
世界 e942da339b Bump version 2026-03-07 15:55:42 +08:00
世界 d28a7ffba1 sing: Revert "Relax domain name validation to support non-standard characters" 2026-03-07 15:44:40 +08:00
世界 4e0a953b98 sing: Revert "Relax domain name validation to support non-standard characters" 2026-03-07 15:44:40 +08:00
世界andeveryx 23e2d28c21 Fix DNS exchange failure and recursion deadlock in connector
Co-authored-by: everyx <lunt.luo@gmail.com>
2026-03-06 15:31:22 +08:00
世界andeveryx 27c5b0b1af Fix DNS exchange failure and recursion deadlock in connector
Co-authored-by: everyx <lunt.luo@gmail.com>
2026-03-06 15:31:22 +08:00
dyhkwongandGitHub c490e06b29 Fix v2ray HTTP transport server 2026-03-06 10:13:39 +08:00
dyhkwongandGitHub 84019b06d9 Fix v2ray HTTP transport server 2026-03-06 10:13:39 +08:00
世界 66d89918aa Bump version 2026-03-05 21:46:27 +08:00
世界 7fd21f8bf4 Bump version 2026-03-05 21:46:27 +08:00
世界 5e4f6437ca Rename branches and update release workflows
stable-next → oldstable, main-next → stable, dev-next → testing, new unstable
2026-03-05 21:12:02 +08:00
世界 88695b0d1f Rename branches and update release workflows
stable-next → oldstable, main-next → stable, dev-next → testing, new unstable
2026-03-05 21:12:02 +08:00
世界 88db068ea3 tun: Fix darwin batch loop not exit on EBADF 2026-03-05 20:38:19 +08:00
世界 fb269c9032 tun: Fix darwin batch loop not exit on EBADF 2026-03-05 20:38:19 +08:00
世界 798e5cbec6 Fix rule_set_ip_cidr_accept_empty not working 2026-03-04 11:48:22 +08:00
世界 e62dc7bfa2 Fix rule_set_ip_cidr_accept_empty not working 2026-03-04 11:48:22 +08:00
世界 7bcb2df6be tailscale: Fix netstack TCP connections with system interface 2026-03-03 22:06:54 +08:00
世界 f295e195b5 tailscale: Fix netstack TCP connections with system interface 2026-03-03 22:06:54 +08:00
世界 82482741df Fix fake-ip address allocation 2026-03-03 21:37:24 +08:00
世界 ab76062a41 Fix fake-ip address allocation 2026-03-03 21:37:24 +08:00
世界 14ca4b9607 Fix naive client close 2026-03-03 21:21:09 +08:00
世界 d14417d392 Fix naive client close 2026-03-03 21:21:09 +08:00
世界 b5aaac8518 sing: reject IP literals in IsDomainName 2026-03-03 21:21:09 +08:00
世界 96c5c27610 sing: reject IP literals in IsDomainName 2026-03-03 21:21:09 +08:00
世界 e269ad6528 release: Unify default build tags and linker flags into shared files
Move hardcoded build tags and ldflags from Makefile, Dockerfile, CI
workflows, and local build scripts into canonical files under release/:

- release/DEFAULT_BUILD_TAGS (Linux common archs, Darwin, Android)
- release/DEFAULT_BUILD_TAGS_WINDOWS (includes with_purego)
- release/DEFAULT_BUILD_TAGS_OTHERS (no with_naive_outbound)
- release/LDFLAGS (shared linker flags)
2026-03-03 21:21:09 +08:00
世界 91f92bee49 release: Unify default build tags and linker flags into shared files
Move hardcoded build tags and ldflags from Makefile, Dockerfile, CI
workflows, and local build scripts into canonical files under release/:

- release/DEFAULT_BUILD_TAGS (Linux common archs, Darwin, Android)
- release/DEFAULT_BUILD_TAGS_WINDOWS (includes with_purego)
- release/DEFAULT_BUILD_TAGS_OTHERS (no with_naive_outbound)
- release/LDFLAGS (shared linker flags)
2026-03-03 21:21:09 +08:00
Shtorm 845288be86 Add Kmutex 2026-03-03 00:51:20 +03:00
Shtorm 9066702ddd Add migrate 2026-03-03 00:51:04 +03:00
Shtorm 395e63130f Update Amnezia H1-H4 format 2026-03-02 21:48:54 +03:00
Shtorm 5a689bee8c Fix typo 2026-03-02 21:27:47 +03:00
Shtorm 150d004eed Fix failover 2026-03-02 19:48:06 +03:00
Shtorm be457896dd Fix failover 2026-03-02 19:33:59 +03:00
Shtorm efa88fac6d Update AmneziaWG 2026-03-02 19:33:07 +03:00
Shtorm 4d082ff5b9 Fix bond outbound 2026-03-02 19:31:23 +03:00
世界 7ff25431c0 endpoint: Fix UDP resolved destination 2026-03-02 13:55:26 +08:00
世界 1803471e02 endpoint: Fix UDP resolved destination 2026-03-02 13:55:26 +08:00
世界 19d9c17d5a Update external dependencies 2026-03-02 06:53:10 +08:00
世界 3de56d344e Update external dependencies 2026-03-02 06:53:10 +08:00
世界 8a050baf37 Update dependencies 2026-03-02 06:52:35 +08:00
世界 c71abbdfb8 Update dependencies 2026-03-02 06:52:35 +08:00
Shtorm 50b28e1edd Update AmneziaWG 2026-03-01 16:42:21 +03:00
世界 48591b1436 sing: Relax domain name validation to support non-standard characters 2026-03-01 19:45:19 +08:00
世界 ed15121e95 sing: Relax domain name validation to support non-standard characters 2026-03-01 19:45:19 +08:00
世界 f009c7be63 documentation: Update mkdcos-material 2026-03-01 18:37:31 +08:00
世界 46c6945da5 documentation: Update mkdcos-material 2026-03-01 18:37:31 +08:00
46453be6dd clash-api: Fix websocket connection not closed after config reload via SIGHUP
Co-authored-by: TraitMan <traitman@maildog.top>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-03-01 12:30:43 +08:00
1beb4cb002 clash-api: Fix websocket connection not closed after config reload via SIGHUP
Co-authored-by: TraitMan <traitman@maildog.top>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-03-01 12:30:43 +08:00
dyhkwongand世界 28c1f2c51e Fix IPv6 local DNS on Windows 2026-03-01 12:30:43 +08:00
dyhkwongand世界 4c65fea1ac Fix IPv6 local DNS on Windows 2026-03-01 12:30:43 +08:00
世界 da06212268 Remove overdue deprecated features 2026-03-01 12:30:43 +08:00
世界 8ae93a98e5 Remove overdue deprecated features 2026-03-01 12:30:43 +08:00
世界 5af16a47a8 Bump version 2026-02-28 14:42:39 +08:00
世界 6da7e538e1 Bump version 2026-02-28 14:42:39 +08:00
世界 52737fadd1 Update tfo-go 2026-02-27 19:55:32 +08:00
世界 13e6ba4cb2 Update tfo-go 2026-02-27 19:55:32 +08:00
世界 681c51195f Fix missing Tailscale in ProxyDisplayName 2026-02-27 19:39:52 +08:00
世界 93b7328c3f Fix missing Tailscale in ProxyDisplayName 2026-02-27 19:39:52 +08:00
世界 5cc0eab30e Fixes in cronet-go 2026-02-27 19:39:52 +08:00
世界 11dc5bcbe1 Fixes in cronet-go 2026-02-27 19:39:52 +08:00
世界 8c4f7ce5a4 platform: Fix gorelease build 2026-02-27 15:07:16 +08:00
世界 fa3ab87b11 platform: Fix gorelease build 2026-02-27 15:07:16 +08:00
世界 96cf5822a0 dialer: use KeepAliveConfig for TCP keepalive 2026-02-27 14:58:06 +08:00
世界 9bd9e9a58b dialer: use KeepAliveConfig for TCP keepalive 2026-02-27 14:58:06 +08:00
世界 2cbf6d2b6c release: Fix pacman package 2026-02-27 14:58:06 +08:00
世界 9d6dee7451 release: Fix pacman package 2026-02-27 14:58:06 +08:00
世界 cf5333562d Fix per-outbound bind_interface 2026-02-27 14:58:06 +08:00
世界 9c2cdc7203 Fix per-outbound bind_interface 2026-02-27 14:58:06 +08:00
世界 acc3d774cb platform: Improve OOM killer for iOS 2026-02-27 14:58:06 +08:00
世界 65150f5cc3 platform: Improve OOM killer for iOS 2026-02-27 14:58:06 +08:00
世界 4621b39024 tailscale: Fix AdvertiseTags 2026-02-27 14:58:06 +08:00
世界 21a1512e6c tailscale: Fix AdvertiseTags 2026-02-27 14:58:06 +08:00
Shtorm c744edcd35 Fix examples 2026-02-27 00:47:22 +03:00
Shtorm 9eb61e8e6f Update README.md 2026-02-27 00:19:37 +03:00
Shtorm 368beb147d Merge branch 'extended' into extended-next 2026-02-26 22:58:59 +03:00
Shtorm a7f1d0b835 Resolve conflicts 2026-02-26 22:58:45 +03:00
Shtorm c958c8075f Add examples 2026-02-26 22:57:44 +03:00
Shtorm 48546f7777 Resolve conflicts 2026-02-26 22:57:25 +03:00
Shtorm bd7cb38666 Add examples 2026-02-26 22:55:24 +03:00
Shtorm ded1eb9635 Add admin panel, manager, node_manager, bandwidth limiter, connection limiter, bonding, failover, vless encryption, mkcp transport 2026-02-26 22:44:31 +03:00
Shtorm a865f67b59 Add vless encryption 2026-02-26 18:03:59 +03:00
世界 8436c06718 platform: Improve iOS OOM killer 2026-02-26 14:13:32 +08:00
世界 cf4791f1ad platform: Improve iOS OOM killer 2026-02-26 14:13:32 +08:00
世界 847cbcdae8 service/ccm,ocm: Fixes and improvements 2026-02-26 13:36:46 +08:00
世界 0bc66e5a56 service/ccm,ocm: Fixes and improvements 2026-02-26 13:36:46 +08:00
ShtormandGitHub 6dd94ec7e6 Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2026-02-26 02:43:48 +03:00
Shtorm c9dd381736 Update README.md 2026-02-25 14:10:09 +03:00
Shtorm 4cf4f8e884 Add DONATE.md 2026-02-25 14:03:36 +03:00
世界 f734a055e4 Fix wireguard reserved 2026-02-24 15:49:52 +08:00
世界 d48236da94 Fix wireguard reserved 2026-02-24 15:49:52 +08:00
世界 9bdb7990dd Add advertise tags support for Tailscale endpoint 2026-02-24 15:31:57 +08:00
世界 4c05d7b888 Add advertise tags support for Tailscale endpoint 2026-02-24 15:31:57 +08:00
世界 44c9c4af4b Bump version 2026-02-23 18:17:47 +08:00
世界 94ed42caf1 Bump version 2026-02-23 18:17:47 +08:00
世界 a50fba62dc tun: Fix nftablesCreateLocalAddressSets 2026-02-23 18:17:47 +08:00
世界 e0c18cc3d4 tun: Fix nftablesCreateLocalAddressSets 2026-02-23 18:17:47 +08:00
世界 d4696a9e37 release: Fix Docker build for loong64 and mipsle 2026-02-23 16:31:19 +08:00
世界 0817c25f4c release: Fix Docker build for loong64 and mipsle 2026-02-23 16:31:19 +08:00
世界 7c2bdf0407 daemon: Fix started service leak 2026-02-23 14:49:58 +08:00
世界 7745a97cca daemon: Fix started service leak 2026-02-23 14:49:58 +08:00
Shtorm 2574c05770 Fix examples 2026-02-22 18:10:15 +03:00
Shtorm b7a16c7ef1 Fix typo 2026-02-22 17:59:02 +03:00
Shtorm fe872dacc9 Fix padding 2026-02-22 16:22:52 +03:00
Shtorm b86eaea5b2 Update Dockerfile 2026-02-22 15:50:39 +03:00
Shtorm 3e230bf3ad Update xhttp examples 2026-02-22 15:50:00 +03:00
Shtorm 5610a2d4c3 Fix xhttp options 2026-02-22 15:46:12 +03:00
Shtorm 848023b03a Fix Range 2026-02-22 15:45:53 +03:00
Shtorm ab9a37e0d4 Fix examples 2026-02-22 14:51:16 +03:00
Shtorm a3aaf2cb92 Update xhttp 2026-02-22 14:48:52 +03:00
Shtorm 9e4eb52a82 Update sing-box core 2026-02-22 14:46:42 +03:00
世界 b2998a19ab Bump version 2026-02-21 13:55:31 +08:00
世界 9bcd715d31 Bump version 2026-02-21 13:55:31 +08:00
世界 d65c447afe Pin Go version to 1.25.7 2026-02-21 13:55:31 +08:00
世界 6a95c66bc7 Pin Go version to 1.25.7 2026-02-21 13:55:31 +08:00
世界 701248d820 More linux builds for naive 2026-02-21 13:55:31 +08:00
世界 b5800847ae More linux builds for naive 2026-02-21 13:55:31 +08:00
世界 ac873fd537 Treat H3 RequestCanceled as closed 2026-02-21 09:31:11 +08:00
世界 aa85cbb86e Treat H3 RequestCanceled as closed 2026-02-21 09:31:11 +08:00
世界 ca253a2892 Minor fixes for naive 2026-02-18 01:26:29 +08:00
世界 c59991420e Minor fixes for naive 2026-02-18 01:26:29 +08:00
世界 aa99aa2d2b Bump version 2026-02-16 12:46:43 +08:00
世界 c0304b8362 Bump version 2026-02-16 12:46:43 +08:00
世界 28e19d2292 quic-go: Minor fixes 2026-02-16 12:46:29 +08:00
世界 d1f1271a02 quic-go: Minor fixes 2026-02-16 12:46:29 +08:00
世界 d736c5811c platform: Add semver helper 2026-02-16 11:28:54 +08:00
世界 de4fdbe553 platform: Add semver helper 2026-02-16 11:28:54 +08:00
世界 8a676fc338 Bump version 2026-02-15 21:13:55 +08:00
世界 804606042f Bump version 2026-02-15 21:13:55 +08:00
世界 fa890d47a0 platform: Add windows build 2026-02-15 21:10:44 +08:00
世界 53f2db3f97 platform: Add windows build 2026-02-15 21:10:44 +08:00
世界 b7d7d487a1 release: Fix update_apple_version command 2026-02-15 21:09:14 +08:00
世界 1f2fdec89d release: Fix update_apple_version command 2026-02-15 21:09:14 +08:00
世界 4652eb2bb5 Fix matching multi predefined 2026-02-15 21:09:06 +08:00
世界 8714c157c9 Fix matching multi predefined 2026-02-15 21:09:06 +08:00
世界 f3d3680f74 Fix matching rule-set invert 2026-02-15 21:08:33 +08:00
世界 657fba4ca5 Fix matching rule-set invert 2026-02-15 21:08:33 +08:00
世界 2a9517a9a2 wireguard: Fix missing fallback for gso 2026-02-15 21:08:26 +08:00
世界 0a69621207 wireguard: Fix missing fallback for gso 2026-02-15 21:08:26 +08:00
世界 b9be5e3de7 Bump version 2026-02-15 21:05:34 +08:00
世界 1a0e413300 Fix matching multi predefined 2026-02-15 19:20:31 +08:00
世界 6bd4157a9c Fix matching rule-set invert 2026-02-15 19:20:11 +08:00
世界 fd1dadc3e0 wireguard: Fix missing fallback for gso 2026-02-15 19:20:03 +08:00
世界 5d95ea3a97 Bump version 2026-02-09 15:50:51 +08:00
世界 58ccf82e0b Bump version 2026-02-09 15:50:51 +08:00
世界 298efba16d tuic: Fix udp context 2026-02-09 15:50:51 +08:00
世界 ceab244329 tuic: Fix udp context 2026-02-09 15:50:51 +08:00
世界 b2f77cd78c Fix naive padding 2026-02-09 15:50:51 +08:00
世界 58fcdceca2 Fix naive padding 2026-02-09 15:50:51 +08:00
世界 e847748f69 experimental: New FFI 2026-02-09 15:50:51 +08:00
世界 98af3c0ad6 experimental: New FFI 2026-02-09 15:50:51 +08:00
世界 2fc11b43af Bump version 2026-02-09 13:57:18 +08:00
世界 1d1b40c8b2 tuic: Fix udp context 2026-02-09 13:55:09 +08:00
世界 ca831f367a Fix naive padding 2026-02-09 13:53:32 +08:00
世界 c7811a159d Standardize gomobile usages 2026-02-07 15:52:26 +08:00
世界 172a9d5e4e Standardize gomobile usages 2026-02-07 15:52:26 +08:00
世界 dd067b6e75 Fix DNS cache lock goroutine leak
The cache deduplication in Client.Exchange uses a channel-based lock
per DNS question. Waiting goroutines blocked on <-cond without context
awareness, causing them to accumulate indefinitely when the owning
goroutine's transport call stalls. Add select on ctx.Done() so waiters
respect context cancellation and timeouts.
2026-02-06 22:28:35 +08:00
世界 aba8346bd6 Fix DNS cache lock goroutine leak
The cache deduplication in Client.Exchange uses a channel-based lock
per DNS question. Waiting goroutines blocked on <-cond without context
awareness, causing them to accumulate indefinitely when the owning
goroutine's transport call stalls. Add select on ctx.Done() so waiters
respect context cancellation and timeouts.
2026-02-06 22:28:35 +08:00
世界 264e7ad3ee Fix DNS cache lock goroutine leak
The cache deduplication in Client.Exchange uses a channel-based lock
per DNS question. Waiting goroutines blocked on <-cond without context
awareness, causing them to accumulate indefinitely when the owning
goroutine's transport call stalls. Add select on ctx.Done() so waiters
respect context cancellation and timeouts.
2026-02-06 22:28:30 +08:00
世界 a3983eab47 socks: Fix "Fix missing UDP timeout" 2026-02-06 22:26:45 +08:00
世界 d8e269e0ac socks: Fix "Fix missing UDP timeout" 2026-02-06 22:26:45 +08:00
世界 5f7d49ca5a Recover from bbolt panics on corrupted database
When bbolt encounters corrupted page data at runtime, it panics
instead of returning an error. Wrap all DB transactions with
recover to catch these panics, delete the corrupted database
file, and reopen a fresh one.
2026-02-06 19:35:32 +08:00
世界 c45ea8dfac Recover from bbolt panics on corrupted database
When bbolt encounters corrupted page data at runtime, it panics
instead of returning an error. Wrap all DB transactions with
recover to catch these panics, delete the corrupted database
file, and reopen a fresh one.
2026-02-06 19:35:32 +08:00
世界 962988aa4c Bump version 2026-02-05 20:28:25 +08:00
世界 a2d313c59b Bump version 2026-02-05 20:28:25 +08:00
世界 92bd2edad7 Update Go to 1.25.7 2026-02-05 17:49:06 +08:00
世界 15722b06dd Update Go to 1.25.7 2026-02-05 17:49:06 +08:00
世界 5fdb29396b Fix vmess crash 2026-02-05 17:23:49 +08:00
世界 d230dae0a5 Fix vmess crash 2026-02-05 17:23:49 +08:00
世界 6177981707 Bump version 2026-02-05 17:13:38 +08:00
世界 6db8307fd8 Update Go to 1.25.7 2026-02-05 17:12:42 +08:00
世界 400aa437fd bufio: Refactor copy 2026-02-05 12:03:03 +08:00
世界 e11dbf3a8e bufio: Refactor copy 2026-02-05 12:03:03 +08:00
世界 c98fb6615a documentation: Update release changelog 2026-02-05 12:03:03 +08:00
世界 baa9f29f0d documentation: Update release changelog 2026-02-05 12:03:03 +08:00
世界 332bbacf67 socks: Fix missing UDP timeout 2026-02-05 12:03:03 +08:00
世界 55b6e7dbfe socks: Fix missing UDP timeout 2026-02-05 12:03:03 +08:00
世界 1c57f08148 Fix route_address_set duplicated IP sets causing route creation failure
The FlatMap calls pre-populated routeAddressSet and routeExcludeAddressSet
before the for-loops which appended the same IP sets again, doubling every
entry. On Windows this caused CreateIpForwardEntry2 to return
ERROR_OBJECT_ALREADY_EXISTS.

Fixes #3725
2026-02-02 17:29:21 +08:00
世界 ccff578358 Fix random iproute2 table index was incorrectly removed 2026-02-02 14:15:55 +08:00
世界 a05e05a47c Fix random iproute2 table index was incorrectly removed 2026-02-02 14:15:55 +08:00
世界 dd20d2dd96 Fix random iproute2 table index was incorrectly removed 2026-02-02 14:13:49 +08:00
世界 c2fb08b323 Bump version 2026-02-01 12:29:57 +08:00
世界 c1dc6cb0fb Bump version 2026-02-01 12:29:57 +08:00
世界 e180b8362d Disable rp filter atomically 2026-02-01 10:49:12 +08:00
世界 432fe1b3c9 Disable rp filter atomically 2026-02-01 10:49:12 +08:00
世界 7940a48f55 Fix varbin serialization 2026-02-01 10:48:05 +08:00
世界 8dd8897fd8 Fix varbin serialization 2026-02-01 10:48:05 +08:00
世界 879848f6eb Bump version 2026-02-01 10:19:35 +08:00
世界 4b357da0bb Disable rp filter atomically 2026-02-01 10:17:34 +08:00
世界 9f5db8e8c1 Fix varbin serialization 2026-02-01 10:11:15 +08:00
世界 9d9549078f Bump version 2026-01-30 14:05:29 +08:00
世界 ff58edb1c1 Bump version 2026-01-30 14:05:29 +08:00
世界 eadd41c4ce Fix auto_redirect fallback rule 2026-01-30 11:42:56 +08:00
世界 79bab39502 Fix auto_redirect fallback rule 2026-01-30 11:42:56 +08:00
世界 ca3bbb1687 Minor fixes 2026-01-29 13:40:34 +08:00
世界 a4d5d59901 Minor fixes 2026-01-29 13:40:34 +08:00
世界 5b9f98c8c7 Remove varbin usages 2026-01-29 13:40:34 +08:00
世界 1af14a0237 Remove varbin usages 2026-01-29 13:40:34 +08:00
世界 90f7953dee release: Always build tailscale for iOS and tvOS 2026-01-29 13:40:34 +08:00
世界 944a9986d9 release: Always build tailscale for iOS and tvOS 2026-01-29 13:40:34 +08:00
世界 260145e8f7 Fix auto_redirect fallback rule 2026-01-29 12:07:15 +08:00
世界 bcf5ba02da Bump version 2026-01-28 16:56:08 +08:00
世界 4a83d436a2 Minor fixes 2026-01-28 16:56:08 +08:00
Shtorm 625f31f67c Update AmneziaWG 2026-01-25 21:24:43 +03:00
Shtorm 61826bc189 Resolve conflicts 2026-01-18 21:53:22 +03:00
Shtorm 8cc0e48117 Fix logger 2026-01-18 21:51:30 +03:00
BalthildandGitHub a456e2072f Add acmedns support 2026-01-17 20:52:43 +08:00
BalthildandGitHub 60a1e4c866 Add acmedns support 2026-01-17 20:52:43 +08:00
世界 2a8d7dec64 documentation: Bump version 2026-01-17 19:21:19 +08:00
世界 5d67c131fa documentation: Bump version 2026-01-17 19:21:19 +08:00
世界 778be9cbb5 Skip strict routing in Windows versions below Windows 10 2026-01-17 19:21:19 +08:00
世界 b9cc87d35a Skip strict routing in Windows versions below Windows 10 2026-01-17 19:21:19 +08:00
世界 0716079d4a Fix trafficontrol Manager 2026-01-17 19:16:56 +08:00
世界 490d501257 Fix trafficontrol Manager 2026-01-17 19:16:56 +08:00
世界 638aedd1a0 release: Update android command 2026-01-17 19:16:56 +08:00
世界 725e4adc46 release: Update android command 2026-01-17 19:16:56 +08:00
世界 9f9626446a release: Log build ID during TestFlight publishing 2026-01-17 19:16:56 +08:00
世界 4a14d39cad release: Log build ID during TestFlight publishing 2026-01-17 19:16:56 +08:00
世界 eafb8be23f Fix naive outbound on iOS 2026-01-17 19:15:56 +08:00
世界 8ec58c96f5 Fix naive outbound on iOS 2026-01-17 19:15:56 +08:00
世界 4bedd71627 platform: Refactor CommandClient & Connections 2026-01-17 05:50:39 +08:00
世界 e8450b2e61 platform: Refactor CommandClient & Connections 2026-01-17 05:50:39 +08:00
世界 40394bc4c8 Fix logic issues with BBR impl 2026-01-17 05:50:16 +08:00
世界 30c3855e4b Fix logic issues with BBR impl 2026-01-17 05:50:16 +08:00
世界 30a004af7b release: Improve publish_testflight 2026-01-17 05:50:08 +08:00
世界 ccf90aee8a release: Improve publish_testflight 2026-01-17 05:50:08 +08:00
世界 2ed258ebac Update quic-go to v0.59.0 2026-01-17 05:50:07 +08:00
世界 e6c03fd448 Update quic-go to v0.59.0 2026-01-17 05:50:07 +08:00
世界 0bdef55d2a platform: Uniq network interfaces 2026-01-17 05:49:57 +08:00
世界 e0f1cdf464 platform: Uniq network interfaces 2026-01-17 05:49:57 +08:00
世界 51a5451a5f Add dial option bind_address_no_port 2026-01-17 05:49:56 +08:00
世界 8d88c6532f Add dial option bind_address_no_port 2026-01-17 05:49:56 +08:00
世界 97397b867c platform: Display k based bytes 2026-01-17 05:49:45 +08:00
世界 3890bd2be7 platform: Display k based bytes 2026-01-17 05:49:45 +08:00
世界 694d694d8c Fix tailscale endpoint 2026-01-17 05:49:35 +08:00
世界 6cd1eb9b94 Fix tailscale endpoint 2026-01-17 05:49:35 +08:00
世界 4bc27e7cb5 tailscale: Add system interface support 2026-01-17 05:49:24 +08:00
世界 f196b7a583 tailscale: Add system interface support 2026-01-17 05:49:24 +08:00
世界 fae770c98b platform: Fix gomobile build 2026-01-17 05:49:13 +08:00
世界 bd9935eebb platform: Fix gomobile build 2026-01-17 05:49:13 +08:00
世界 4ee7c1039e platform: Update apple build comamnds 2026-01-17 05:49:13 +08:00
世界 0e0e838ff5 platform: Update apple build comamnds 2026-01-17 05:49:13 +08:00
世界 9541ef8bcb platform: Improve interface 2026-01-17 05:49:12 +08:00
世界 0caebd3171 platform: Improve interface 2026-01-17 05:49:12 +08:00
世界 469c0f648b Downgrade quic-go to v0.57.1 2026-01-17 05:49:12 +08:00
世界 7d2944eba9 Downgrade quic-go to v0.57.1 2026-01-17 05:49:12 +08:00
世界 fb11c2f6d7 Fix linux musl builds 2026-01-17 05:48:59 +08:00
世界 a5db2feb5e Fix linux musl builds 2026-01-17 05:48:59 +08:00
世界 6be2464420 Fix openwrt builds 2026-01-17 05:48:59 +08:00
世界 708ceb3d29 Fix openwrt builds 2026-01-17 05:48:59 +08:00
世界 193bd0d5ea Add kmod-nft-queue dependency for openwrt package 2026-01-17 05:48:59 +08:00
世界 157e33f2a4 Add kmod-nft-queue dependency for openwrt package 2026-01-17 05:48:59 +08:00
世界 bf619e67ab Fix nfqueue fallback 2026-01-17 05:48:58 +08:00
世界 1d4fb83313 Fix nfqueue fallback 2026-01-17 05:48:58 +08:00
世界 4cd79cef55 Disable multipath TCP by default via GODEBUG 2026-01-17 05:48:58 +08:00
世界 85f5f6cebb Disable multipath TCP by default via GODEBUG 2026-01-17 05:48:58 +08:00
世界 28d2ff2492 Fix missing relay support for Tailscale 2026-01-17 05:48:57 +08:00
世界 6a750f4522 Fix missing relay support for Tailscale 2026-01-17 05:48:57 +08:00
世界 8107377d7f cronet: Fix windows DNS hijack 2026-01-17 05:48:42 +08:00
世界 46c2cc37c3 cronet: Fix windows DNS hijack 2026-01-17 05:48:42 +08:00
世界 f085917d8c Fix DNS transports 2026-01-17 05:48:41 +08:00
世界 aa8dd6e44f Fix DNS transports 2026-01-17 05:48:41 +08:00
世界 dbd06758c0 platform: Expose process info 2026-01-17 05:48:41 +08:00
世界 4e94a64dcc platform: Expose process info 2026-01-17 05:48:41 +08:00
世界 4caa950da9 Update bypass action behavior for auto redirect 2026-01-17 05:48:41 +08:00
世界 494990f914 Update bypass action behavior for auto redirect 2026-01-17 05:48:41 +08:00
世界 909d1c9df9 platform: Add GetStartedAt for StartedService 2026-01-17 05:48:40 +08:00
世界 95ccb837d3 platform: Add GetStartedAt for StartedService 2026-01-17 05:48:40 +08:00
世界 bb955f9a08 documentation: Format changes header 2026-01-17 05:48:40 +08:00
世界 24b33a43fc documentation: Format changes header 2026-01-17 05:48:40 +08:00
世界 9131a80656 Add format_docs command for documentation trailing space formatting 2026-01-17 05:48:39 +08:00
世界 8ae16aa452 Add format_docs command for documentation trailing space formatting 2026-01-17 05:48:39 +08:00
世界 d0da619bc9 Fix panic when closing Box before Start with file log output 2026-01-17 05:48:39 +08:00
世界 bf4a9edc89 Fix panic when closing Box before Start with file log output 2026-01-17 05:48:39 +08:00
世界 024f7b3072 Add pre-match support for auto redirect 2026-01-17 05:48:39 +08:00
世界 78b4eac974 Add pre-match support for auto redirect 2026-01-17 05:48:39 +08:00
世界 0a3f98bd2f Fix cronet on iOS 2026-01-17 05:48:38 +08:00
世界 a34868468f Fix cronet on iOS 2026-01-17 05:48:38 +08:00
世界 26e6a163a3 Ignore darwin IP_DONTFRAG error when not supported 2026-01-17 05:48:37 +08:00
世界 e392c70b6f Ignore darwin IP_DONTFRAG error when not supported 2026-01-17 05:48:37 +08:00
世界 c657f995cf Update tailscale to v1.92.4 2026-01-17 05:48:28 +08:00
世界 511d1bb3fa Update tailscale to v1.92.4 2026-01-17 05:48:28 +08:00
世界 2cc7c953f1 Update cronet-go to v143.0.7499.109-1 2026-01-17 05:48:17 +08:00
世界 4273ffa77e Update cronet-go to v143.0.7499.109-1 2026-01-17 05:48:17 +08:00
世界 e67e2d5fef platform: Split library for Android SDK 21 and 23 2026-01-17 05:48:16 +08:00
世界 f5ccf746ea platform: Split library for Android SDK 21 and 23 2026-01-17 05:48:16 +08:00
世界 984e328839 Fix missing RootPoolFromContext and TimeFuncFromContext in HTTP clients 2026-01-17 05:48:16 +08:00
世界 b2d90b7d86 Fix missing RootPoolFromContext and TimeFuncFromContext in HTTP clients 2026-01-17 05:48:16 +08:00
世界 be12b1d3d1 documentation: Minor fixes 2026-01-17 05:48:16 +08:00
世界 e0a78fde07 documentation: Minor fixes 2026-01-17 05:48:16 +08:00
世界 4c38b70790 documentation: Add Wi-Fi state shared page 2026-01-17 05:48:16 +08:00
世界 203f4134b0 documentation: Add Wi-Fi state shared page 2026-01-17 05:48:16 +08:00
世界 fbbc64dadf Fix missing build constraints for linux wifi state monitor 2026-01-17 05:48:15 +08:00
世界 c2b697a778 Fix missing build constraints for linux wifi state monitor 2026-01-17 05:48:15 +08:00
世界 ba49af1ce8 Update dependencies 2026-01-17 05:48:15 +08:00
世界 ddec2ab282 Update dependencies 2026-01-17 05:48:15 +08:00
世界 380a1aa163 Update quic-go to v0.58.0 2026-01-17 05:48:04 +08:00
世界 35ff7d1fb4 Update quic-go to v0.58.0 2026-01-17 05:48:04 +08:00
世界 1512f65c98 Add Chrome Root Store certificate option
Adds `chrome` as a new certificate store option alongside `mozilla`.
Both stores filter out China-based CA certificates.
2026-01-17 05:47:54 +08:00
世界 cba18635c8 Add Chrome Root Store certificate option
Adds `chrome` as a new certificate store option alongside `mozilla`.
Both stores filter out China-based CA certificates.
2026-01-17 05:47:54 +08:00
世界 691c442c21 Fix cronet-go crash 2026-01-17 05:47:54 +08:00
世界 0d8c7a9c5d Fix cronet-go crash 2026-01-17 05:47:54 +08:00
世界 e52736b2c0 Add trace logging for lifecycle calls
Log start/close operations with timing information for debugging.
2026-01-17 05:47:54 +08:00
世界 faff3174a3 Add trace logging for lifecycle calls
Log start/close operations with timing information for debugging.
2026-01-17 05:47:54 +08:00
世界 899c2ed7b1 documentation: Minor fixes 2026-01-17 05:47:54 +08:00
世界 2fc1b672cc documentation: Minor fixes 2026-01-17 05:47:54 +08:00
世界 50859575f2 Remove certificate_public_key_sha256 for naive 2026-01-17 05:47:54 +08:00
世界 143983b585 Remove certificate_public_key_sha256 for naive 2026-01-17 05:47:54 +08:00
世界 c7086b8759 platform: Use new crash log api 2026-01-17 05:47:54 +08:00
世界 4afdf4153a platform: Use new crash log api 2026-01-17 05:47:54 +08:00
世界 e3bf40daea Fix naive network 2026-01-17 05:47:53 +08:00
世界 750dc9c3e0 Fix naive network 2026-01-17 05:47:53 +08:00
世界 42d62a1e21 Add QUIC support for naiveproxy 2026-01-17 05:47:52 +08:00
世界 48b7adde7d Add QUIC support for naiveproxy 2026-01-17 05:47:52 +08:00
世界 464554ab8f Add ECH support for NaiveProxy outbound and tls.ech.query_server_name option
- Enable ECH for NaiveProxy outbound with DNS resolver integration
- Add query_server_name option to override domain for ECH HTTPS record queries
- Update cronet-go dependency and remove windows_386 support
2026-01-17 05:47:42 +08:00
世界 0585f6d065 Add ECH support for NaiveProxy outbound and tls.ech.query_server_name option
- Enable ECH for NaiveProxy outbound with DNS resolver integration
- Add query_server_name option to override domain for ECH HTTPS record queries
- Update cronet-go dependency and remove windows_386 support
2026-01-17 05:47:42 +08:00
世界 4f69035de1 Fix naiveproxy build 2026-01-17 05:47:42 +08:00
世界 8101a7b0bd Fix naiveproxy build 2026-01-17 05:47:42 +08:00
世界 0fd51633f4 Add OpenAI Codex Multiplexer service 2026-01-17 05:47:42 +08:00
世界 e8620587dd Add OpenAI Codex Multiplexer service 2026-01-17 05:47:42 +08:00
世界 40ccecb341 Update pricing for CCM service 2026-01-17 05:47:42 +08:00
世界 a89680fa2d Update pricing for CCM service 2026-01-17 05:47:42 +08:00
世界 120c4f8a4c release: Upload only other apks 2026-01-17 05:47:42 +08:00
世界 b919039c43 release: Upload only other apks 2026-01-17 05:47:42 +08:00
世界 8b2adb0bc7 Fix bugs and add UoT option for naiveproxy outbound 2026-01-17 05:47:41 +08:00
世界 9b0960bb5a Fix bugs and add UoT option for naiveproxy outbound 2026-01-17 05:47:41 +08:00
世界 3313c6e0b2 Add naiveproxy outbound 2026-01-17 05:47:41 +08:00
世界 ad7b982242 Add naiveproxy outbound 2026-01-17 05:47:41 +08:00
世界 48939dfb26 Apply ping destination filter for Windows 2026-01-17 05:47:33 +08:00
世界 7e68013b05 Apply ping destination filter for Windows 2026-01-17 05:47:33 +08:00
世界 869efaad58 platform: Add UsePlatformWIFIMonitor to gRPC interface
Align dev-next-grpc with wip2 by adding UsePlatformWIFIMonitor()
to the new PlatformInterface, allowing platform clients to indicate
they handle WIFI monitoring themselves.
2026-01-17 05:47:32 +08:00
世界 ac427b98f4 platform: Add UsePlatformWIFIMonitor to gRPC interface
Align dev-next-grpc with wip2 by adding UsePlatformWIFIMonitor()
to the new PlatformInterface, allowing platform clients to indicate
they handle WIFI monitoring themselves.
2026-01-17 05:47:32 +08:00
世界 56682e32ba daemon: Add clear logs 2026-01-17 05:47:32 +08:00
世界 a5fb467db2 daemon: Add clear logs 2026-01-17 05:47:32 +08:00
世界 9b7dc7f877 Revert "Stop using DHCP on iOS and tvOS" 2026-01-17 05:47:32 +08:00
世界 a930356b04 Revert "Stop using DHCP on iOS and tvOS" 2026-01-17 05:47:32 +08:00
世界 0b6fe45fb9 platform: Refactoring libbox to use gRPC-based protocol 2026-01-17 05:47:32 +08:00
世界 5bc0dfa9dd platform: Refactoring libbox to use gRPC-based protocol 2026-01-17 05:47:32 +08:00
世界 35062abc34 Add Windows WI-FI state support 2026-01-17 05:47:27 +08:00
世界 743b460e51 Add Windows WI-FI state support 2026-01-17 05:47:27 +08:00
世界 701b82279d Add Linux WI-FI state support
Support monitoring WIFI state on Linux through:
- NetworkManager (D-Bus)
- IWD (D-Bus)
- wpa_supplicant (control socket)
- ConnMan (D-Bus)
2026-01-17 05:47:04 +08:00
世界 8d8ca282a1 Add Linux WI-FI state support
Support monitoring WIFI state on Linux through:
- NetworkManager (D-Bus)
- IWD (D-Bus)
- wpa_supplicant (control socket)
- ConnMan (D-Bus)
2026-01-17 05:47:04 +08:00
世界 c9c686369f Add more tcp keep alive options
Also update default TCP keep-alive initial period from 10 minutes to 5 minutes.
2026-01-17 05:47:04 +08:00
世界 cd56eaaba2 Add more tcp keep alive options
Also update default TCP keep-alive initial period from 10 minutes to 5 minutes.
2026-01-17 05:47:04 +08:00
世界 9905aa5c6f Update quic-go to v0.57.1 2026-01-17 05:46:52 +08:00
世界 e92938364d Update quic-go to v0.57.1 2026-01-17 05:46:52 +08:00
世界 6d4e1d333f Fix read credentials for ccm service 2026-01-17 05:46:24 +08:00
世界 1c4614318e Fix read credentials for ccm service 2026-01-17 05:46:24 +08:00
世界 e354670c36 Add claude code multiplexer service 2026-01-17 05:46:23 +08:00
世界 0f5cda4169 Add claude code multiplexer service 2026-01-17 05:46:23 +08:00
世界 d4897abb53 Fix compatibility with MPTCP 2026-01-17 05:46:23 +08:00
世界 d87c9fd242 Fix compatibility with MPTCP 2026-01-17 05:46:23 +08:00
世界 529f050a56 Use a more conservative strategy for resolving with systemd-resolved for local DNS server 2026-01-17 05:46:23 +08:00
世界 fce21607bd Use a more conservative strategy for resolving with systemd-resolved for local DNS server 2026-01-17 05:46:23 +08:00
世界 5470977941 Fix missing mTLS support in client options 2026-01-17 05:46:23 +08:00
世界 3dc285be8c Fix missing mTLS support in client options 2026-01-17 05:46:23 +08:00
世界 3e3b2d0b29 Add curve preferences, pinned public key SHA256 and mTLS for TLS options 2026-01-17 05:46:22 +08:00
世界 79bbce3db3 Add curve preferences, pinned public key SHA256 and mTLS for TLS options 2026-01-17 05:46:22 +08:00
世界 f76f179907 Fix WireGuard input packet 2026-01-17 05:46:22 +08:00
世界 dfd95b2615 Fix WireGuard input packet 2026-01-17 05:46:22 +08:00
世界 50732226c4 Update tfo-go to latest 2026-01-17 05:46:21 +08:00
世界 ab0869c972 Update tfo-go to latest 2026-01-17 05:46:21 +08:00
世界 0acf11ff70 Remove compatibility codes 2026-01-17 05:46:14 +08:00
世界 9ac0539ffd Remove compatibility codes 2026-01-17 05:46:14 +08:00
世界 bc86dcec9b Do not use linkname by default to simplify debugging 2026-01-17 05:46:14 +08:00
世界 cb4deb0c20 Do not use linkname by default to simplify debugging 2026-01-17 05:46:14 +08:00
世界 e901bb8d06 documentation: Update chinese translations 2026-01-17 05:46:14 +08:00
世界 6b90b61358 documentation: Update chinese translations 2026-01-17 05:46:14 +08:00
世界 63a1edc0de Update quic-go to v0.55.0 2026-01-17 05:46:13 +08:00
世界 ed1ee4c3a4 Update quic-go to v0.55.0 2026-01-17 05:46:13 +08:00
世界 e7c387b49b Update WireGuard and Tailscale 2026-01-17 05:46:02 +08:00
世界 7f3ea8dbd8 Update WireGuard and Tailscale 2026-01-17 05:46:02 +08:00
世界 07042cdcca Fix preConnectionCopy 2026-01-17 05:46:01 +08:00
世界 12b055989b Fix preConnectionCopy 2026-01-17 05:46:01 +08:00
世界 c034da1d0d Fix ping domain 2026-01-17 05:46:01 +08:00
世界 49056b5060 Fix ping domain 2026-01-17 05:46:01 +08:00
世界 03f5eca54c release: Fix linux build 2026-01-17 05:46:01 +08:00
世界 c530995832 release: Fix linux build 2026-01-17 05:46:01 +08:00
世界 4f9f088e40 Improve ktls rx error handling 2026-01-17 05:46:01 +08:00
世界 60d81a73d9 Improve ktls rx error handling 2026-01-17 05:46:01 +08:00
世界 c387601c27 Improve compatibility for kTLS 2026-01-17 05:46:00 +08:00
世界 e9c46cc359 Improve compatibility for kTLS 2026-01-17 05:46:00 +08:00
世界 a8a4467bc3 ktls: Add warning for inappropriate scenarios 2026-01-17 05:44:43 +08:00
世界 9110851af3 ktls: Add warning for inappropriate scenarios 2026-01-17 05:44:43 +08:00
世界 47392e55a2 Add support for kTLS
Reference: https://gitlab.com/go-extension/tls
2026-01-17 05:44:42 +08:00
世界 107f92381b Add support for kTLS
Reference: https://gitlab.com/go-extension/tls
2026-01-17 05:44:42 +08:00
世界 e2ba72e7c1 Add proxy support for ICMP echo request 2026-01-17 05:44:41 +08:00
世界 f84129ca79 Add proxy support for ICMP echo request 2026-01-17 05:44:41 +08:00
世界 6f00a94eb9 Fix resolve using resolved 2026-01-17 05:44:29 +08:00
世界 44fafcef73 Fix resolve using resolved 2026-01-17 05:44:29 +08:00
世界 3a33affe43 documentation: Update behavior of local DNS server on darwin 2026-01-17 05:44:29 +08:00
世界 a5e09fcd43 documentation: Update behavior of local DNS server on darwin 2026-01-17 05:44:29 +08:00
世界 0d7f40e60d Remove use of ldflags -checklinkname=0 on darwin 2026-01-17 05:44:29 +08:00
世界 387b42c9c2 Remove use of ldflags -checklinkname=0 on darwin 2026-01-17 05:44:29 +08:00
世界 99466af6b7 Fix legacy DNS config 2026-01-17 05:44:29 +08:00
世界 044eb728cb Fix legacy DNS config 2026-01-17 05:44:29 +08:00
世界 14bec14972 Fix rule-set format 2026-01-17 05:44:29 +08:00
世界 2be8a45f14 Fix rule-set format 2026-01-17 05:44:29 +08:00
世界 56518e827e documentation: Remove outdated icons 2026-01-17 05:44:29 +08:00
世界 1336987756 documentation: Remove outdated icons 2026-01-17 05:44:29 +08:00
世界 51d9ff9812 documentation: Improve local DNS server 2026-01-17 05:44:28 +08:00
世界 e3473d3de0 documentation: Improve local DNS server 2026-01-17 05:44:28 +08:00
世界 958799e85e Stop using DHCP on iOS and tvOS
We do not have the `com.apple.developer.networking.multicast` entitlement and are unable to obtain it for non-technical reasons.
2026-01-17 05:44:28 +08:00
世界 bba92146b1 Stop using DHCP on iOS and tvOS
We do not have the `com.apple.developer.networking.multicast` entitlement and are unable to obtain it for non-technical reasons.
2026-01-17 05:44:28 +08:00
世界 ce778e569b Improve local DNS server on darwin
We mistakenly believed that `libresolv`'s `search` function worked correctly in NetworkExtension, but it seems only `getaddrinfo` does.

This commit changes the behavior of the `local` DNS server in NetworkExtension to prefer DHCP, falling back to `getaddrinfo` if DHCP servers are unavailable.

It's worth noting that `prefer_go` does not disable DHCP since it respects Dial Fields, but `getaddrinfo` does the opposite. The new behavior only applies to NetworkExtension, not to all scenarios (primarily command-line binaries) as it did previously.

In addition, this commit also improves the DHCP DNS server to use the same robust query logic as `local`.
2026-01-17 05:44:28 +08:00
世界 48f84b31d6 Improve local DNS server on darwin
We mistakenly believed that `libresolv`'s `search` function worked correctly in NetworkExtension, but it seems only `getaddrinfo` does.

This commit changes the behavior of the `local` DNS server in NetworkExtension to prefer DHCP, falling back to `getaddrinfo` if DHCP servers are unavailable.

It's worth noting that `prefer_go` does not disable DHCP since it respects Dial Fields, but `getaddrinfo` does the opposite. The new behavior only applies to NetworkExtension, not to all scenarios (primarily command-line binaries) as it did previously.

In addition, this commit also improves the DHCP DNS server to use the same robust query logic as `local`.
2026-01-17 05:44:28 +08:00
世界 dd489ab415 Use resolved in local DNS server if available 2026-01-17 05:44:28 +08:00
世界 1c846df903 Use resolved in local DNS server if available 2026-01-17 05:44:28 +08:00
xchacha20-poly1305and世界 9a66482483 Fix rule set version 2026-01-17 05:44:27 +08:00
xchacha20-poly1305and世界 0bd98a300f Fix rule set version 2026-01-17 05:44:27 +08:00
世界 52e4ddbb86 documentation: Add preferred_by route rule item 2026-01-17 05:44:27 +08:00
世界 87eaf3ce6e documentation: Add preferred_by route rule item 2026-01-17 05:44:27 +08:00
世界 5c8b07acfe Add preferred_by route rule item 2026-01-17 05:44:27 +08:00
世界 239e6ec701 Add preferred_by route rule item 2026-01-17 05:44:27 +08:00
世界 bc029ca5fe documentation: Add interface address rule items 2026-01-17 05:44:27 +08:00
世界 5be1887f92 documentation: Add interface address rule items 2026-01-17 05:44:27 +08:00
世界 d373f57e57 Add interface address rule items 2026-01-17 05:44:26 +08:00
世界 65264afdf9 Add interface address rule items 2026-01-17 05:44:26 +08:00
世界 158f246d1d Fix ECH retry support 2026-01-17 05:44:26 +08:00
世界 fecdbf20de Fix ECH retry support 2026-01-17 05:44:26 +08:00
neletorand世界 6fdd08ac2d Add support for ech retry configs 2026-01-17 05:44:26 +08:00
neletorand世界 1f03080540 Add support for ech retry configs 2026-01-17 05:44:26 +08:00
Zephyrusoand世界 bde9463a22 Add /dns/flush-clash meta api 2026-01-17 05:44:26 +08:00
Zephyrusoand世界 737162e75a Add /dns/flush-clash meta api 2026-01-17 05:44:26 +08:00
世界 ce28df923d Bump version 2026-01-17 05:10:56 +08:00
世界 51ce402dbb Bump version 2026-01-17 05:10:56 +08:00
世界 41c530ac8f Update Go to 1.25.6 2026-01-17 05:10:56 +08:00
世界 8b404b5a4c Update Go to 1.25.6 2026-01-17 05:10:56 +08:00
世界 2ec0977115 Bump version 2026-01-17 04:54:24 +08:00
世界 7a212f7c7b Update uTLS to v1.8.2 2026-01-17 04:54:18 +08:00
世界 3ce94d50dd Update uTLS to v1.8.2 2026-01-17 04:54:18 +08:00
世界 43823da9cd Update smux to v1.5.50 & Fix h2mux RST_STREAM on half-close 2026-01-17 04:17:14 +08:00
世界 29d56fca9c Update smux to v1.5.50 & Fix h2mux RST_STREAM on half-close 2026-01-17 04:17:14 +08:00
世界 a2c9fdd7b6 Bump version 2026-01-12 20:38:21 +08:00
世界 ab18010ee1 Bump version 2026-01-12 20:38:21 +08:00
世界 e3e6e9067c Fix logic issues with BBR impl 2026-01-12 20:34:04 +08:00
世界 e69c202c79 Fix logic issues with BBR impl 2026-01-12 20:34:04 +08:00
世界 2b732cef16 Bump version 2026-01-07 15:13:35 +08:00
世界 0a812f2a46 Bump version 2026-01-07 15:13:35 +08:00
Gavin Luoand世界 e923f63606 Fix reset buffer in dhcp response loop
Previously, the buffer was not reset within the response loop. If a packet
handle failed or completed, the buffer retained its state. Specifically,
if `ReadPacketFrom` returned `io.ErrShortBuffer`, the error was ignored
via `continue`, but the buffer remained full. This caused the next
read attempt to immediately fail with the same error, creating a tight
busy-wait loop that consumed 100% CPU.

Validates `buffer.Reset()` is called at the start of each iteration to
ensure a clean state for 'ReadPacketFrom'.
2026-01-05 17:46:59 +08:00
Gavin Luoand世界 fffe9fc566 Fix reset buffer in dhcp response loop
Previously, the buffer was not reset within the response loop. If a packet
handle failed or completed, the buffer retained its state. Specifically,
if `ReadPacketFrom` returned `io.ErrShortBuffer`, the error was ignored
via `continue`, but the buffer remained full. This caused the next
read attempt to immediately fail with the same error, creating a tight
busy-wait loop that consumed 100% CPU.

Validates `buffer.Reset()` is called at the start of each iteration to
ensure a clean state for 'ReadPacketFrom'.
2026-01-05 17:46:59 +08:00
世界 53f0e142e5 Fix Tailscale endpoint using wrong source IP with advertise_routes 2026-01-04 22:14:54 +08:00
世界 6fdf27a701 Fix Tailscale endpoint using wrong source IP with advertise_routes 2026-01-04 22:14:54 +08:00
Bruce Wayneand世界 0b68c1d276 ducumentation: update Shadowsocks inbound documentation for SSM API 2026-01-02 19:18:52 +08:00
Bruce Wayneand世界 7fa7d4f0a9 ducumentation: update Shadowsocks inbound documentation for SSM API 2026-01-02 19:18:52 +08:00
世界 21bff4ba42 Fix lint errors 2026-01-02 19:17:53 +08:00
世界 f511ebc1d4 Fix lint errors 2026-01-02 19:17:53 +08:00
世界 cb89991fe1 Revert "Pin gofumpt and golangci-lint versions"
This reverts commit 6775c029df.
2026-01-02 19:14:13 +08:00
世界 84bbdc2eba Revert "Pin gofumpt and golangci-lint versions"
This reverts commit d9d7f7880d.
2026-01-02 19:14:13 +08:00
世界 2453747018 Fix duplicate tag detection for empty tags
Closes https://github.com/SagerNet/sing-box/issues/3665
2026-01-02 19:14:13 +08:00
世界 568612fc70 Fix duplicate tag detection for empty tags
Closes https://github.com/SagerNet/sing-box/issues/3665
2026-01-02 19:14:13 +08:00
世界 59314bbce4 Fix quic sniffer 2026-01-02 19:14:13 +08:00
世界 d78828fd81 Fix quic sniffer 2026-01-02 19:14:13 +08:00
世界 2cc7894a0d Bump version 2025-12-25 14:47:10 +08:00
世界 f56d9ab945 Bump version 2025-12-25 14:47:10 +08:00
世界 4637874b3c Update Mozilla certificates 2025-12-25 14:42:18 +08:00
世界 86fabd6a22 Update Mozilla certificates 2025-12-25 14:42:18 +08:00
世界 9f7368a4dc Ignore darwin IP_DONTFRAG error when not supported 2025-12-25 14:40:48 +08:00
世界 24a1e7cee4 Ignore darwin IP_DONTFRAG error when not supported 2025-12-25 14:40:48 +08:00
世界 83e0a8bc48 Fix TCP DNS response buffer 2025-12-22 13:51:00 +08:00
世界 223dd8bb1a Fix TCP DNS response buffer 2025-12-22 13:51:00 +08:00
世界 0f5810c43c Fix missing RootPoolFromContext and TimeFuncFromContext in HTTP clients 2025-12-22 13:50:57 +08:00
世界 68448de7d0 Fix missing RootPoolFromContext and TimeFuncFromContext in HTTP clients 2025-12-22 13:50:57 +08:00
世界 4eb91d69fe Fix DNS cache not working when domain strategy is set
The cache lookup was performed before rule matching, using the caller's
strategy (usually AsIS/0) instead of the resolved strategy. This caused
cache misses when ipv4_only was configured globally but the cache lookup
expected both A and AAAA records.

Remove LookupCache and ExchangeCache from Router, as the cache checks
inside client.Lookup and client.Exchange already handle caching correctly
after rule matching with the proper strategy and transport.
2025-12-21 16:59:10 +08:00
世界 1ebff74c21 Fix DNS cache not working when domain strategy is set
The cache lookup was performed before rule matching, using the caller's
strategy (usually AsIS/0) instead of the resolved strategy. This caused
cache misses when ipv4_only was configured globally but the cache lookup
expected both A and AAAA records.

Remove LookupCache and ExchangeCache from Router, as the cache checks
inside client.Lookup and client.Exchange already handle caching correctly
after rule matching with the proper strategy and transport.
2025-12-21 16:59:10 +08:00
世界 b1800571e7 Bump version 2025-12-14 00:09:19 +08:00
世界 f0cd3422c1 Bump version 2025-12-14 00:09:19 +08:00
世界 671c49ca6f Update Go to 1.25.5 2025-12-13 20:11:29 +08:00
世界 e385a98ced Update Go to 1.25.5 2025-12-13 20:11:29 +08:00
世界 b651ac4f39 Fix naive inbound 2025-12-12 21:19:28 +08:00
世界 670f32baee Fix naive inbound 2025-12-12 21:19:28 +08:00
Shtorm 0f38dbba4c Update XHTTP 2025-12-11 02:46:57 +03:00
Shtorm 92beba066b Fix typo 2025-12-08 23:18:51 +03:00
Shtorm 86289d667c Add new wireguard options 2025-12-08 22:32:33 +03:00
Shtorm 24a85e7773 Fix XHTTP TLS 2025-12-08 22:30:58 +03:00
世界 04e8a7a5f4 Fix tailscale destination 2025-12-01 15:02:04 +08:00
世界 2747a00ba2 Fix tailscale destination 2025-12-01 15:02:04 +08:00
世界 063d20d221 Update Go to 1.25.4 2025-11-16 09:53:10 +08:00
世界 48e76038d0 Update Go to 1.25.4 2025-11-16 09:53:10 +08:00
世界 5f8a7d96b4 release: Fix windows7 build 2025-11-16 09:09:34 +08:00
世界 6421252d44 release: Fix windows7 build 2025-11-16 09:09:34 +08:00
世界 d1b303bf90 Fix adapter handler 2025-11-16 08:34:46 +08:00
世界 216c4c8bd4 Fix adapter handler 2025-11-16 08:34:46 +08:00
世界 61c33e6db4 ssm-api: Fix save cache 2025-11-04 11:00:43 +08:00
世界 5841d410a1 ssm-api: Fix save cache 2025-11-04 11:00:43 +08:00
Kumiko as a Serviceand世界 764232eff0 Use --no-cache --upgrade option in apk add
No need for separate upgrade / cache cleanup steps.

Signed-off-by: Kumiko as a Service <Dreista@users.noreply.github.com>
2025-11-04 11:00:41 +08:00
Kumiko as a Serviceand世界 63c8207d7a Use --no-cache --upgrade option in apk add
No need for separate upgrade / cache cleanup steps.

Signed-off-by: Kumiko as a Service <Dreista@users.noreply.github.com>
2025-11-04 11:00:41 +08:00
ShtormandGitHub 0082297e92 Merge pull request #6 from starifly/extended
fix(xhttp): use download request URL for down leg
2025-11-03 19:13:46 +03:00
starifly 5f9f095c7b fix(xhttp): use download request URL for down leg 2025-11-03 23:18:03 +08:00
Shtorm edeb84ecc3 Remove direct detour checking 2025-11-02 17:59:12 +03:00
Shtorm 19097906a2 Fix Range 2025-11-02 17:55:18 +03:00
Shtorm 2f95050c27 Resolve unnecessary logger 2025-11-02 17:41:18 +03:00
Shtorm e7a31d7a4c Resolve conflicts 2025-11-02 17:39:38 +03:00
世界 378d03f4fe Bump version 2025-10-27 18:04:24 +08:00
世界 54ed58499d Bump version 2025-10-27 18:04:24 +08:00
世界 841a0fc469 Fix socks response 2025-10-27 18:03:05 +08:00
世界 b1bdc18c85 Fix socks response 2025-10-27 18:03:05 +08:00
世界 f514e4a39f Fix memory leak in hysteria2 2025-10-24 10:52:08 +08:00
世界 a38030cc0b Fix memory leak in hysteria2 2025-10-24 10:52:08 +08:00
世界 123b31b48a Bump version 2025-10-21 21:39:28 +08:00
世界 4626aa2cb0 Bump version 2025-10-21 21:39:28 +08:00
世界 9232171ec6 Update dependencies 2025-10-21 21:39:28 +08:00
世界 5a40b673a4 Update dependencies 2025-10-21 21:39:28 +08:00
世界 712f7b3ced redirect: Fix compatibility with /product/bin/su 2025-10-21 21:27:15 +08:00
世界 541f63fee4 redirect: Fix compatibility with /product/bin/su 2025-10-21 21:27:15 +08:00
世界 21fe1ba677 Fix tailscale not enforcing NoLogsNoSupport 2025-10-16 22:30:08 +08:00
世界 5de6f4a14f Fix tailscale not enforcing NoLogsNoSupport 2025-10-16 22:30:08 +08:00
世界 8179612f4d Fix trailing dot handling in local DNS transport 2025-10-16 21:43:12 +08:00
世界 5658830077 Fix trailing dot handling in local DNS transport 2025-10-16 21:43:12 +08:00
世界 ef000b332b documentation: Add appreciate for Warp 2025-10-16 21:43:12 +08:00
世界 0e50edc009 documentation: Add appreciate for Warp 2025-10-16 21:43:12 +08:00
世界 cc7e1c1b95 Bump version 2025-10-14 23:43:36 +08:00
世界 444f454810 Bump version 2025-10-14 23:43:36 +08:00
世界 010cc83eb9 Update Go to 1.25.3 2025-10-14 23:43:36 +08:00
世界 d0e1fd6c7e Update Go to 1.25.3 2025-10-14 23:43:36 +08:00
世界 8ab0a78d7a Update uTLS to v1.8.1 2025-10-14 23:40:19 +08:00
世界 17b4d1e010 Update uTLS to v1.8.1 2025-10-14 23:40:19 +08:00
世界 a3b3955f1c Fix DNS reject panic 2025-10-14 23:40:19 +08:00
世界 06791470c9 Fix DNS reject panic 2025-10-14 23:40:19 +08:00
世界 93d1cfe6e0 Disable TCP slow open for anytls
Fixes #3459
2025-10-14 23:40:19 +08:00
世界 ef14c8ca0e Disable TCP slow open for anytls
Fixes #3459
2025-10-14 23:40:19 +08:00
世界 eb4cacec06 Fix DNS negative caching to comply with RFC 2308 2025-10-09 23:45:23 +08:00
世界 36dc883c7c Fix DNS negative caching to comply with RFC 2308 2025-10-09 23:45:23 +08:00
Mahdiand世界 e331ae8a92 Fix dns cache in lookup 2025-10-09 23:45:23 +08:00
Mahdiand世界 6557bd7029 Fix dns cache in lookup 2025-10-09 23:45:23 +08:00
世界 869528acba Improve HTTPS DNS transport 2025-10-09 23:45:23 +08:00
世界 41b30c91d9 Improve HTTPS DNS transport 2025-10-09 23:45:23 +08:00
世界 ea50eea398 Update .gitignore 2025-10-07 13:37:11 +08:00
世界 0f767d5ce1 Update .gitignore 2025-10-07 13:37:11 +08:00
世界 0aa52d57c7 Bump version 2025-10-05 17:58:21 +08:00
世界 328a6de797 Bump version 2025-10-05 17:58:21 +08:00
Mahdiand世界 82648278eb Fix dns truncate 2025-10-05 17:58:21 +08:00
Mahdiand世界 886be6414d Fix dns truncate 2025-10-05 17:58:21 +08:00
世界 1c1407797a Attempt to fix leak in quic-go 2025-10-01 11:59:17 +08:00
世界 9362d3cab3 Attempt to fix leak in quic-go 2025-10-01 11:59:17 +08:00
世界 e131f857bd Update dependencies 2025-10-01 11:55:33 +08:00
世界 ced2e39dbf Update dependencies 2025-10-01 11:55:33 +08:00
anytls世界anytls <anytls>
342df44427 Update anytls v0.0.11
Co-authored-by: anytls <anytls>
2025-10-01 10:23:15 +08:00
anytls世界anytls <anytls>
2159d8877b Update anytls v0.0.11
Co-authored-by: anytls <anytls>
2025-10-01 10:23:15 +08:00
世界 3180efe42c release: Improve publish testflight 2025-10-01 10:22:44 +08:00
世界 cb7dba3eff release: Improve publish testflight 2025-10-01 10:22:44 +08:00
世界 6775c029df Pin gofumpt and golangci-lint versions
As we don't want to remove naked returns
2025-09-23 16:33:42 +08:00
世界 d9d7f7880d Pin gofumpt and golangci-lint versions
As we don't want to remove naked returns
2025-09-23 16:33:42 +08:00
世界 a4265930dd Do not reset network on sleep or wake 2025-09-23 16:17:44 +08:00
世界 a031aaf2c0 Do not reset network on sleep or wake 2025-09-23 16:17:44 +08:00
世界 adeb572e8d Fix adguard matcher 2025-09-23 16:12:29 +08:00
世界 4bca951773 Fix adguard matcher 2025-09-23 16:12:29 +08:00
世界 e55c0679dc Fix websocket log handling 2025-09-23 16:12:29 +08:00
世界 140735dbde Fix websocket log handling 2025-09-23 16:12:29 +08:00
世界 82d4e87dd6 Update .gitignore 2025-09-23 16:12:29 +08:00
世界 714a68bba1 Update .gitignore 2025-09-23 16:12:29 +08:00
Shtorm 3fad8858bb Update README.md 2025-09-15 01:25:46 +03:00
Shtorm 13c826bfa3 Integrate Amnezia 1.5 2025-09-15 01:25:19 +03:00
Shtorm c1ced4d495 Update go.sum 2025-09-14 23:45:55 +03:00
Shtorm 650e57feff Resolve conflicts 2025-09-14 23:44:29 +03:00
世界 d2d4e13af7 Bump version 2025-09-13 13:16:13 +08:00
世界 573c6179ab Bump version 2025-09-13 13:16:13 +08:00
世界 c525437256 Fix UDP exchange for local/dhcp DNS servers 2025-09-13 12:26:48 +08:00
世界 510bf05e36 Fix UDP exchange for local/dhcp DNS servers 2025-09-13 12:26:48 +08:00
世界 67ed3c0fd9 Bump version 2025-09-13 03:09:10 +08:00
世界 ae852e0be4 Bump version 2025-09-13 03:09:10 +08:00
世界 475dc17c8a Do not cache DNS responses with empty answers 2025-09-13 03:04:08 +08:00
世界 1955002ed8 Do not cache DNS responses with empty answers 2025-09-13 03:04:08 +08:00
世界 d25b749d82 Bump version 2025-09-13 00:07:57 +08:00
世界 44559fb7b9 Bump version 2025-09-13 00:07:57 +08:00
世界 2c6aa1f52b release: Disable Apple platform CI builds, since `-allowProvisioningUpdates is broken by Apple 2025-09-13 00:07:57 +08:00
世界 0977c5cf73 release: Disable Apple platform CI builds, since `-allowProvisioningUpdates is broken by Apple 2025-09-13 00:07:57 +08:00
世界 341e2c7d65 release: Fix xcode build 2025-09-12 22:57:44 +08:00
世界 07697bf931 release: Fix xcode build 2025-09-12 22:57:44 +08:00
世界 f0292d30ef Fix TCP exchange for local/dhcp DNS servers 2025-09-12 21:58:48 +08:00
世界 5d1d1a1456 Fix TCP exchange for local/dhcp DNS servers 2025-09-12 21:58:48 +08:00
世界 8df94f091f Fix race codes 2025-09-12 21:58:48 +08:00
世界 146383499e Fix race codes 2025-09-12 21:58:48 +08:00
世界 709cdc1f95 Fix DNS exchange 2025-09-12 18:05:02 +08:00
世界 e81a76fdf9 Fix DNS exchange 2025-09-12 18:05:02 +08:00
世界 c368dbf1c2 Fix auto redirect 2025-09-12 11:04:12 +08:00
世界 de13137418 Fix auto redirect 2025-09-12 11:04:12 +08:00
世界 71089ea924 Fix dhcp fetch 2025-09-12 11:03:13 +08:00
世界 e42b818c2a Fix dhcp fetch 2025-09-12 11:03:13 +08:00
世界 1df4962468 Bump version 2025-09-10 22:57:24 +08:00
世界 fcde0c94e0 Bump version 2025-09-10 22:57:24 +08:00
世界 112d37b80e Update Go to 1.25.1 2025-09-10 22:57:24 +08:00
世界 1af83e997d Update Go to 1.25.1 2025-09-10 22:57:24 +08:00
世界 5158296b2f Fix SyscallVectorisedPacketWriter 2025-09-10 22:46:41 +08:00
世界 59ee7be72a Fix SyscallVectorisedPacketWriter 2025-09-10 22:46:41 +08:00
世界 f419d0ce5e Fix timeout check 2025-09-10 22:42:40 +08:00
世界 c331ee3d5c Fix timeout check 2025-09-10 22:42:40 +08:00
世界 80b68baf95 Fix hysteria2 handshake timeout 2025-09-09 18:03:18 +08:00
世界 36babe4bef Fix hysteria2 handshake timeout 2025-09-09 18:03:18 +08:00
世界 412aeda674 Prevent panic when wintun dll fails to load 2025-09-09 14:49:00 +08:00
世界 c5f2cea802 Prevent panic when wintun dll fails to load 2025-09-09 14:49:00 +08:00
世界 383105167b Fix auto redirect output 2025-09-09 14:29:40 +08:00
世界 8a200bf913 Fix auto redirect output 2025-09-09 14:29:40 +08:00
世界 fad41589ce Fix ipv6 tproxy listener 2025-09-09 14:16:40 +08:00
世界 f16468e74f Fix ipv6 tproxy listener 2025-09-09 14:16:40 +08:00
世界 f707dcf194 Fix tls options ignored in mixed inbounds 2025-09-08 19:45:52 +08:00
世界 79c0b9f51d Fix tls options ignored in mixed inbounds 2025-09-08 19:45:52 +08:00
世界 bce6af069f Treat requests with OPT extra but no options as simple requests 2025-09-08 09:12:30 +08:00
世界 f98a3a4f65 Treat requests with OPT extra but no options as simple requests 2025-09-08 09:12:30 +08:00
世界 979b6df8d2 Fix DNS packet size 2025-09-08 09:12:30 +08:00
世界 b14cecaeb2 Fix DNS packet size 2025-09-08 09:12:30 +08:00
世界 45387f3231 Fix DNS client 2025-09-08 09:12:30 +08:00
世界 2594745ef8 Fix DNS client 2025-09-08 09:12:30 +08:00
世界 38c5d92a0c Fix DNS cache 2025-09-08 09:12:30 +08:00
世界 cc3041322e Fix DNS cache 2025-09-08 09:12:30 +08:00
世界 8507461549 Fix read address 2025-09-05 15:16:14 +08:00
世界 f352f84483 Fix read address 2025-09-05 15:16:14 +08:00
世界 1edac3cfff Fix multiple sniff 2025-09-03 20:09:05 +08:00
世界 cbf48e9b8c Fix multiple sniff 2025-09-03 20:09:05 +08:00
世界 40c3c7f506 Fix route.default_interface not taking effect 2025-09-02 18:00:02 +08:00
世界 0ef7e8eca2 Fix route.default_interface not taking effect 2025-09-02 18:00:02 +08:00
世界 6f8d04d609 Fix linux icmp routes 2025-09-02 17:55:48 +08:00
世界 1a18e43a88 Fix linux icmp routes 2025-09-02 17:55:48 +08:00
世界 412fa4cfbc Fix typo in TestSniffUQUICChrome115 2025-09-02 17:55:26 +08:00
世界 6849288d6d Fix typo in TestSniffUQUICChrome115 2025-09-02 17:55:26 +08:00
世界 5a401ea2bf Improve DHCP DNS server 2025-09-02 17:55:26 +08:00
世界 2edfed7d91 Improve DHCP DNS server 2025-09-02 17:55:26 +08:00
世界 3b96bed864 Fix local DNS server on legacy windows 2025-09-02 17:55:26 +08:00
世界 30c069f5b7 Fix local DNS server on legacy windows 2025-09-02 17:55:26 +08:00
世界 b2cc54fb87 Fix domain strategy not taking effect 2025-09-02 17:35:27 +08:00
世界 649163cb7b Fix domain strategy not taking effect 2025-09-02 17:35:27 +08:00
世界 556d908d5d Bump version 2025-08-28 12:11:30 +08:00
世界 980e96250b Bump version 2025-08-28 12:11:30 +08:00
世界 a6189c56c6 Enforce Tailscale NoLogsNoSupport 2025-08-28 10:30:13 +08:00
世界 963bc4b647 Enforce Tailscale NoLogsNoSupport 2025-08-28 10:30:13 +08:00
世界 2efdd4dd7c Deprecate common/atomic 2025-08-25 19:49:12 +08:00
世界 031f25c1c1 Deprecate common/atomic 2025-08-25 19:49:12 +08:00
世界 51b085c94e Bump version 2025-08-21 09:43:47 +08:00
世界 b40f642fa4 Bump version 2025-08-21 09:43:47 +08:00
世界 93c0fb6067 Fix outbound start 2025-08-21 09:41:31 +08:00
世界 22782ca6fc Fix outbound start 2025-08-21 09:41:31 +08:00
世界 746d07de91 Make realityClientConnWrapper replaceable 2025-08-20 16:26:27 +08:00
世界 1468d83895 Make realityClientConnWrapper replaceable 2025-08-20 16:26:27 +08:00
世界 ed5fc07493 Bump version 2025-08-20 09:20:41 +08:00
世界 97f0dc8a60 Bump version 2025-08-20 09:20:41 +08:00
dyhkwongand世界 26636843af Fix tlsfragment fallback writeAndWaitAck 2025-08-20 09:20:41 +08:00
dyhkwongand世界 ee02532ab5 Fix tlsfragment fallback writeAndWaitAck 2025-08-20 09:20:41 +08:00
世界 c2946c80d3 Make ReadWaitConn reader replaceable 2025-08-20 09:18:03 +08:00
世界 f1dd0dba78 Make ReadWaitConn reader replaceable 2025-08-20 09:18:03 +08:00
wwqgtxxand世界 40b5c137f1 Update cast using in sing-vmess 2025-08-20 08:45:09 +08:00
wwqgtxxand世界 f4ed684146 Update cast using in sing-vmess 2025-08-20 08:45:09 +08:00
wwqgtxxand世界 465b481c7b Make utlsConnWrapper replaceable 2025-08-20 08:45:09 +08:00
wwqgtxxand世界 83f02d0bfb Make utlsConnWrapper replaceable 2025-08-20 08:45:09 +08:00
wwqgtxxand世界 d2178180e0 Make realityConnWrapper replaceable 2025-08-20 08:45:09 +08:00
wwqgtxxand世界 52fa5f20a3 Make realityConnWrapper replaceable 2025-08-20 08:45:09 +08:00
世界 63621cdc3f Update tfo-go 2025-08-19 21:56:05 +08:00
世界 f462ce5615 Update tfo-go 2025-08-19 21:56:05 +08:00
世界 831e92816e Fix failed DNS responses being incorrectly rejected 2025-08-19 11:14:46 +08:00
世界 cef3e538ba Fix failed DNS responses being incorrectly rejected 2025-08-19 11:14:46 +08:00
世界 2d70ad3562 Fix bind_interface not working with auto_redirect 2025-08-17 14:48:01 +08:00
世界 acda4ce985 Fix bind_interface not working with auto_redirect 2025-08-17 14:48:01 +08:00
世界 98a8acf3ce Fix resolved service 2025-08-16 00:09:29 +08:00
世界 354ece2bdf Fix resolved service 2025-08-16 00:09:29 +08:00
Shtorm 1ebc3a2d10 Resolve conflicts 2025-08-15 12:57:47 +03:00
Shtorm b2c1eb1e48 Resolve conflicts 2025-08-15 12:56:52 +03:00
世界 bc03fb71d8 Fix ssm-api 2025-08-15 15:05:37 +08:00
世界 de10bb00a9 Fix ssm-api 2025-08-15 15:05:37 +08:00
世界 c06b212363 Fix atomic pointer usages 2025-08-15 15:05:34 +08:00
世界 fdc181106d Fix atomic pointer usages 2025-08-15 15:05:34 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
0220470306 [dependencies] Update golang Docker tag to v1.25 (#3276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 12:45:43 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
8752b631bd [dependencies] Update golang Docker tag to v1.25 (#3276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 12:45:43 +08:00
世界 8d5f1ad310 Update golangci-lint to v2 2025-08-13 23:37:40 +08:00
世界 378e39f70c Update golangci-lint to v2 2025-08-13 23:37:40 +08:00
renovate[bot]and世界 030a789870 [dependencies] Update github-actions 2025-08-13 22:12:19 +08:00
renovate[bot]and世界 043a2e7a07 [dependencies] Update github-actions 2025-08-13 22:12:19 +08:00
世界 f8e13d566e Fix build with Go 1.25 2025-08-13 22:08:35 +08:00
世界 7e190e92ca Fix build with Go 1.25 2025-08-13 22:08:35 +08:00
世界 80e3b65a15 Update Go to 1.25 2025-08-13 22:08:35 +08:00
世界 5eb318ba06 Update Go to 1.25 2025-08-13 22:08:35 +08:00
世界 8665813933 Fix h2mux close check 2025-08-13 21:04:01 +08:00
世界 4a209f1afb Fix h2mux close check 2025-08-13 21:04:01 +08:00
世界 1510745643 Reduce default MTU for android 2025-08-13 11:48:44 +08:00
世界 c0ac3c748c Reduce default MTU for android 2025-08-13 11:48:44 +08:00
世界 409bb52d35 platform: Fix context 2025-08-13 11:26:32 +08:00
世界 a65d3e040a platform: Fix context 2025-08-13 11:26:32 +08:00
世界 e65b4b05ec release: Fix android build 2025-08-11 22:11:14 +08:00
世界 2358efe44a release: Fix android build 2025-08-11 22:11:14 +08:00
世界 90d5440bb2 release: Fix repo 2025-08-11 22:11:14 +08:00
世界 09d3b8f2c2 release: Fix repo 2025-08-11 22:11:14 +08:00
yuand世界 7b8d7d7594 documentation: Fix tun address format 2025-08-11 22:11:13 +08:00
yuand世界 531de77124 documentation: Fix tun address format 2025-08-11 22:11:13 +08:00
Kismetand世界 bc7e9e46de documentation: Fix typo 2025-08-11 22:11:13 +08:00
Kismetand世界 44981fd803 documentation: Fix typo 2025-08-11 22:11:13 +08:00
世界 ebcd8e084e Bump version 2025-08-10 20:06:28 +08:00
世界 4fb5ac292b Bump version 2025-08-10 20:06:28 +08:00
Sentsukiand世界 b56091e824 documentation: Fix Rcode's migration guide
Signed-off-by: Sentsuki <52487960+Sentsuki@users.noreply.github.com>
2025-08-10 20:06:28 +08:00
Sentsukiand世界 0e23a3d7c2 documentation: Fix Rcode's migration guide
Signed-off-by: Sentsuki <52487960+Sentsuki@users.noreply.github.com>
2025-08-10 20:06:28 +08:00
Oleksandr Redkoand世界 06eed71c66 Simplify slice to array conversion 2025-08-10 20:06:28 +08:00
Oleksandr Redkoand世界 76ee64ae50 Simplify slice to array conversion 2025-08-10 20:06:28 +08:00
Me0woand世界 ebaf145348 documentation: Fix typo
Signed-off-by: Me0wo <152751263+Sn0wo2@users.noreply.github.com>
2025-08-10 20:06:28 +08:00
Me0woand世界 e1dbcccab5 documentation: Fix typo
Signed-off-by: Me0wo <152751263+Sn0wo2@users.noreply.github.com>
2025-08-10 20:06:28 +08:00
Youfu Zhangand世界 00dbe21d73 Fix libresolv initialization
Fixes: 76f7c003ca ("Update libresolv usage")

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2025-08-10 20:06:28 +08:00
Youfu Zhangand世界 fba802effd Fix libresolv initialization
Fixes: 9533031891 ("Update libresolv usage")

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2025-08-10 20:06:28 +08:00
世界 7b301c1a82 Update Go to 1.24.6 2025-08-08 17:07:56 +08:00
世界 9495b56772 Update Go to 1.24.6 2025-08-08 17:07:56 +08:00
世界 d8ffe9b3ab Fix SyscallVectorisedWriter 2025-08-08 16:08:47 +08:00
世界 a8434b176f Fix SyscallVectorisedWriter 2025-08-08 16:08:47 +08:00
世界 52492674e0 Fix legacy domain resolver deprecated warning incorrectly suppressed for direct outbound 2025-08-07 13:56:35 +08:00
世界 ef0004400d Fix legacy domain resolver deprecated warning incorrectly suppressed for direct outbound 2025-08-07 13:56:35 +08:00
世界 5b5ee6ed5b android: Add workaround for tailscale pidfd crash 2025-08-07 12:54:19 +08:00
世界 0a63049845 android: Add workaround for tailscale pidfd crash 2025-08-07 12:54:19 +08:00
世界 a05d94c929 Bump version 2025-08-04 08:54:00 +08:00
世界 2dcb86941f Bump version 2025-08-04 08:54:00 +08:00
世界 332112c91e Fix udp listener write back 2025-08-04 08:54:00 +08:00
世界 5c6eb89cfb Fix udp listener write back 2025-08-04 08:54:00 +08:00
世界 3e5c1b59dd Fix auto redirect panic 2025-08-01 16:50:54 +08:00
世界 5b92eeb3bf Fix auto redirect panic 2025-08-01 16:50:54 +08:00
wwqgtxxand世界 7b27daa937 Fix packetaddr panic 2025-08-01 16:50:54 +08:00
wwqgtxxand世界 3518ce083b Fix packetaddr panic 2025-08-01 16:50:54 +08:00
世界 1241a97aaf Fix vless write 2025-07-28 08:01:52 +08:00
世界 f13c54afc1 Fix vless write 2025-07-28 08:01:52 +08:00
世界 8afe9f4428 Fix ssm-api 2025-07-28 08:01:52 +08:00
世界 3388efe65a Fix ssm-api 2025-07-28 08:01:52 +08:00
世界 6218458eb7 Fix time service wrapper 2025-07-24 09:21:08 +08:00
世界 a11384b286 Fix time service wrapper 2025-07-24 09:21:08 +08:00
dyhkwongand世界 0b3303f07e Fix disable_sni nil time func 2025-07-24 09:21:08 +08:00
dyhkwongand世界 9dd9fb27cd Fix disable_sni nil time func 2025-07-24 09:21:08 +08:00
世界 fcfcf58415 Remove dependency on circl 2025-07-23 11:26:06 +08:00
世界 0f2035149c Remove dependency on circl 2025-07-23 11:26:06 +08:00
世界 3ba66585a9 Fix VectorisedReadWaiter on windows 2025-07-23 11:26:06 +08:00
世界 cba364204a Fix VectorisedReadWaiter on windows 2025-07-23 11:26:06 +08:00
世界 8aeac32286 Update dependencies 2025-07-23 11:26:06 +08:00
世界 4e17788549 Update dependencies 2025-07-23 11:26:06 +08:00
世界 f06546d080 Fix IndexTLSServerName 2025-07-23 11:26:06 +08:00
世界 18a6719893 Fix IndexTLSServerName 2025-07-23 11:26:06 +08:00
dyhkwongand世界 eb541dccc7 Fix disable_sni not working with custom RootCAs 2025-07-22 19:20:09 +08:00
dyhkwongand世界 687343f6ca Fix disable_sni not working with custom RootCAs 2025-07-22 19:20:09 +08:00
世界 39b3a2e02b Update Go to 1.24.5 2025-07-21 10:10:02 +08:00
世界 e061538c30 Update Go to 1.24.5 2025-07-21 10:10:02 +08:00
世界 ece48905f4 Fix data corruption in direct copy 2025-07-21 10:09:59 +08:00
世界 a6375c7530 Fix data corruption in direct copy 2025-07-21 10:09:59 +08:00
世界 4f1a0db7af Fix vision crash 2025-07-20 18:31:05 +08:00
世界 45fa18a2e3 Fix vision crash 2025-07-20 18:31:05 +08:00
世界 d5a71667d0 Fix DNS upgrade 2025-07-18 21:46:03 +08:00
世界 534cccce91 Fix DNS upgrade 2025-07-18 21:46:03 +08:00
世界 d64f844eb2 Improve darwin tun performance 2025-07-18 21:23:04 +08:00
世界 72dbcd3ad4 Improve darwin tun performance 2025-07-18 21:23:04 +08:00
世界 b64231debe Fix UDP DNS buffer size 2025-07-18 12:20:33 +08:00
世界 5533094984 Fix UDP DNS buffer size 2025-07-18 12:20:33 +08:00
Shtorm d7102fd32c Merge branch 'extended' of https://github.com/shtorm-7/sing-box-extended into extended 2025-07-14 13:27:54 +03:00
Shtorm e5f5a19ce1 Update dependencies 2025-07-13 21:48:31 +03:00
Shtorm 7bd0b48a35 Resolve conflicts 2025-07-13 21:44:23 +03:00
Shtorm a5c5671549 Fix tunnel client 2025-07-13 21:41:41 +03:00
Shtorm d78f2793a0 Fix xhttp transport 2025-07-13 21:40:34 +03:00
世界 5e13281992 Increase default mtu to 65535 2025-07-12 14:48:04 +08:00
世界 ae2ecd6002 Increase default mtu to 65535 2025-07-12 14:48:04 +08:00
世界 c93fb1b456 Improve direct copy 2025-07-12 14:48:04 +08:00
世界 0098a2adc5 Improve direct copy 2025-07-12 14:48:04 +08:00
世界 c9064a4d34 Fix DNS reject check 2025-07-08 13:14:46 +08:00
世界 c0dd4a3f07 Fix DNS reject check 2025-07-08 13:14:46 +08:00
世界 699d1b373a Improve copy 2025-07-08 13:14:46 +08:00
世界 497ddb5829 Improve copy 2025-07-08 13:14:46 +08:00
世界 18e4416c33 Increase default mtu under network extension to 4064 2025-07-08 13:14:46 +08:00
世界 811ff93549 Increase default mtu under network extension to 4064 2025-07-08 13:14:46 +08:00
世界 5066bd2114 release: Fix publish testflight 2025-07-08 13:14:46 +08:00
世界 96df69bcdc release: Fix publish testflight 2025-07-08 13:14:46 +08:00
世界 b2dd53e1b8 Improve darwin tun performance 2025-07-08 13:14:46 +08:00
世界 6cfa2b8b86 Improve darwin tun performance 2025-07-08 13:14:46 +08:00
世界 b84cce3096 Improve nftables rules for openwrt 2025-07-08 13:14:46 +08:00
世界 eea1e701b7 Improve nftables rules for openwrt 2025-07-08 13:14:46 +08:00
世界 427804fe30 Fixed DoH server recover from conn freezes 2025-07-08 13:14:45 +08:00
世界 455e5de74d Fixed DoH server recover from conn freezes 2025-07-08 13:14:45 +08:00
世界 76f7c003ca Update libresolv usage 2025-07-08 13:14:45 +08:00
世界 9533031891 Update libresolv usage 2025-07-08 13:14:45 +08:00
yuand世界 1392d94665 documentation: Update client configuration manual 2025-07-08 13:14:45 +08:00
yuand世界 80f8ea6849 documentation: Update client configuration manual 2025-07-08 13:14:45 +08:00
yanwoand世界 c8e2daf345 documentation: Fix typo
Signed-off-by: yanwo <ogilvy@gmail.com>
2025-07-08 13:14:45 +08:00
yanwoand世界 50eadb00c7 documentation: Fix typo
Signed-off-by: yanwo <ogilvy@gmail.com>
2025-07-08 13:14:45 +08:00
anytinzand世界 6e728ab8c1 documentation: Fix wrong SideStore loopback ip 2025-07-08 13:14:45 +08:00
anytinzand世界 d4012bd0b2 documentation: Fix wrong SideStore loopback ip 2025-07-08 13:14:45 +08:00
世界 97e36cb5d6 Revert "release: Add IPA build"
After testing, it seems that since extensions are not handled correctly, it cannot be installed by SideStore.
2025-07-08 13:14:45 +08:00
世界 a902e9f9f6 Revert "release: Add IPA build"
After testing, it seems that since extensions are not handled correctly, it cannot be installed by SideStore.
2025-07-08 13:14:45 +08:00
世界 a0a21b1266 release: Add IPA build 2025-07-08 13:14:45 +08:00
世界 da3ba573d8 release: Add IPA build 2025-07-08 13:14:45 +08:00
世界 9b5ead72c5 Add API to dump AdGuard rules 2025-07-08 13:14:44 +08:00
世界 bea9048cfe Add API to dump AdGuard rules 2025-07-08 13:14:44 +08:00
Sukkaand世界 1e706ff991 Improve AdGuard rule-set parser 2025-07-08 13:14:44 +08:00
Sukkaand世界 fc0f5ed83a Improve AdGuard rule-set parser 2025-07-08 13:14:44 +08:00
Restia-Ashbelland世界 4bea484458 Add ECH support for uTLS 2025-07-08 13:14:44 +08:00
Restia-Ashbelland世界 c0588c30d7 Add ECH support for uTLS 2025-07-08 13:14:44 +08:00
世界 6806d5d436 Improve TLS fragments 2025-07-08 13:14:44 +08:00
世界 24c940c51c Improve TLS fragments 2025-07-08 13:14:44 +08:00
世界 56e94d454f Add cache support for ssm-api 2025-07-08 13:14:44 +08:00
世界 407ee08d8a Add cache support for ssm-api 2025-07-08 13:14:44 +08:00
世界 2a615c8680 Fix service will not be closed 2025-07-08 13:14:44 +08:00
世界 756585fb2a Fix service will not be closed 2025-07-08 13:14:44 +08:00
世界 b21e83d8e7 Add loopback address support for tun 2025-07-08 13:14:44 +08:00
世界 5662784afb Add loopback address support for tun 2025-07-08 13:14:44 +08:00
世界 74170e679b Fix tproxy listener 2025-07-08 13:14:43 +08:00
世界 3801901726 Fix tproxy listener 2025-07-08 13:14:43 +08:00
世界 da7b65381d Fix systemd package 2025-07-08 13:14:43 +08:00
世界 7d58174f1f Fix systemd package 2025-07-08 13:14:43 +08:00
世界 ebdae18a7e Fix missing home for derp service 2025-07-08 13:14:43 +08:00
世界 d339f85087 Fix missing home for derp service 2025-07-08 13:14:43 +08:00
Zero Cloverand世界 4e4e7d766f documentation: Fix services 2025-07-08 13:14:43 +08:00
Zero Cloverand世界 b6a114f7f4 documentation: Fix services 2025-07-08 13:14:43 +08:00
世界 8dd9c55c1e Fix dns.client_subnet ignored 2025-07-08 13:14:43 +08:00
世界 e586ef070e Fix dns.client_subnet ignored 2025-07-08 13:14:43 +08:00
世界 4a99f7f088 documentation: Minor fixes 2025-07-08 13:14:42 +08:00
世界 71a76e9ecb documentation: Minor fixes 2025-07-08 13:14:42 +08:00
世界 2cad6c2772 Fix tailscale forward 2025-07-08 13:14:42 +08:00
世界 1d66474022 Fix tailscale forward 2025-07-08 13:14:42 +08:00
世界 40e1e2c3c8 Minor fixes 2025-07-08 13:14:42 +08:00
世界 3934e53476 Minor fixes 2025-07-08 13:14:42 +08:00
世界 f8f282633b Add SSM API service 2025-07-08 13:14:42 +08:00
世界 0146fbfc40 Add SSM API service 2025-07-08 13:14:42 +08:00
世界 ca912aa72f Add resolved service and DNS server 2025-07-08 13:14:41 +08:00
世界 6ee3117755 Add resolved service and DNS server 2025-07-08 13:14:41 +08:00
世界 167547f95f Add DERP service 2025-07-08 13:14:41 +08:00
世界 e2440a569e Add DERP service 2025-07-08 13:14:41 +08:00
世界 873ab4b085 Add service component type 2025-07-08 13:14:41 +08:00
世界 7a1eee78df Add service component type 2025-07-08 13:14:41 +08:00
世界 09568f9d65 Fix tproxy tcp control 2025-07-08 13:14:40 +08:00
世界 e3c8c0705f Fix tproxy tcp control 2025-07-08 13:14:40 +08:00
愚者and世界 3be37ed5b9 release: Fix build tags for android
Signed-off-by: 愚者 <11926619+FansChou@users.noreply.github.com>
2025-07-08 13:14:40 +08:00
愚者and世界 886d427337 release: Fix build tags for android
Signed-off-by: 愚者 <11926619+FansChou@users.noreply.github.com>
2025-07-08 13:14:40 +08:00
世界 c7a2e47449 prevent creation of bind and mark controls on unsupported platforms 2025-07-08 13:14:40 +08:00
世界 d5432b4c27 prevent creation of bind and mark controls on unsupported platforms 2025-07-08 13:14:40 +08:00
PuerNyaand世界 bbe9b423c4 documentation: Fix description of reject DNS action behavior 2025-07-08 13:14:40 +08:00
PuerNyaand世界 42064fe7ec documentation: Fix description of reject DNS action behavior 2025-07-08 13:14:40 +08:00
Restia-Ashbelland世界 c291df6383 Fix TLS record fragment 2025-07-08 13:14:39 +08:00
Restia-Ashbelland世界 7cee76f9a6 Fix TLS record fragment 2025-07-08 13:14:39 +08:00
世界 5cc728747a Add missing accept_routes option for Tailscale 2025-07-08 13:14:39 +08:00
世界 ed5b2f2997 Add missing accept_routes option for Tailscale 2025-07-08 13:14:39 +08:00
世界 886f7c8253 Add TLS record fragment support 2025-07-08 13:14:38 +08:00
世界 3b480de38a Add TLS record fragment support 2025-07-08 13:14:38 +08:00
世界 6a244312ed Fix set edns0 client subnet 2025-07-08 13:14:38 +08:00
世界 f990630ccc Fix set edns0 client subnet 2025-07-08 13:14:38 +08:00
世界 7cd0117b3c Update minor dependencies 2025-07-08 13:14:38 +08:00
世界 d33614d6a0 Update minor dependencies 2025-07-08 13:14:38 +08:00
世界 4603cd3fec Update certmagic and providers 2025-07-08 13:14:38 +08:00
世界 b3866bcea0 Update certmagic and providers 2025-07-08 13:14:38 +08:00
世界 d03bb80f9f Update protobuf and grpc 2025-07-08 13:14:38 +08:00
世界 26ec73c71b Update protobuf and grpc 2025-07-08 13:14:38 +08:00
世界 1df8a26c5b Add control options for listeners 2025-07-08 13:14:38 +08:00
世界 c3403c5413 Add control options for listeners 2025-07-08 13:14:38 +08:00
世界 f1143269bb Update quic-go to v0.52.0 2025-07-08 13:14:19 +08:00
世界 3b6ddcae37 Update quic-go to v0.52.0 2025-07-08 13:14:19 +08:00
世界 96e5697d23 Update utls to v1.7.2 2025-07-08 13:12:35 +08:00
世界 dbdcce20a8 Update utls to v1.7.2 2025-07-08 13:12:35 +08:00
世界 7f583a3508 Handle EDNS version downgrade 2025-07-08 13:12:35 +08:00
世界 e7ef1b2368 Handle EDNS version downgrade 2025-07-08 13:12:35 +08:00
世界 c0713fddb5 documentation: Fix anytls padding scheme description 2025-07-08 13:12:34 +08:00
世界 ce32d1c2c3 documentation: Fix anytls padding scheme description 2025-07-08 13:12:34 +08:00
安容and世界 3ee134a6ec Report invalid DNS address early 2025-07-08 13:12:34 +08:00
安容and世界 596b66f397 Report invalid DNS address early 2025-07-08 13:12:34 +08:00
世界 a6e57e7a7a Fix wireguard listen_port 2025-07-08 13:12:34 +08:00
世界 d4fd43cf6f Fix wireguard listen_port 2025-07-08 13:12:34 +08:00
世界 431f2b35f1 clash-api: Add more meta api 2025-07-08 13:12:34 +08:00
世界 6c377f16e7 clash-api: Add more meta api 2025-07-08 13:12:34 +08:00
世界 a296b1da3f Fix DNS lookup 2025-07-08 13:12:33 +08:00
世界 349db7baec Fix DNS lookup 2025-07-08 13:12:33 +08:00
世界 df2a908b6b Fix fetch ECH configs 2025-07-08 13:12:33 +08:00
世界 1f3097da00 Fix fetch ECH configs 2025-07-08 13:12:33 +08:00
reletorand世界 8444ac0579 documentation: Minor fixes 2025-07-08 13:12:33 +08:00
reletorand世界 0b4b5e6f0f documentation: Minor fixes 2025-07-08 13:12:33 +08:00
caelansarand世界 80d3e7dd99 Fix callback deletion in UDP transport 2025-07-08 13:12:32 +08:00
caelansarand世界 245273e6c1 Fix callback deletion in UDP transport 2025-07-08 13:12:32 +08:00
世界 97994a4aef documentation: Try to make the play review happy 2025-07-08 13:12:32 +08:00
世界 54a0004de6 documentation: Try to make the play review happy 2025-07-08 13:12:32 +08:00
世界 b0a448fa0e Fix missing handling of legacy domain_strategy options 2025-07-08 13:12:32 +08:00
世界 6a211f6ed6 Fix missing handling of legacy domain_strategy options 2025-07-08 13:12:32 +08:00
世界 4f83e98736 Improve local DNS server 2025-07-08 13:12:32 +08:00
世界 aadb44ebd6 Improve local DNS server 2025-07-08 13:12:32 +08:00
anytls世界anytls <anytls>
5a1f0ea281 Update anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:31 +08:00
anytls世界anytls <anytls>
9b0db6ab15 Update anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:31 +08:00
世界 2082e1e0fc Fix DNS dialer 2025-07-08 13:12:31 +08:00
世界 5b363c347f Fix DNS dialer 2025-07-08 13:12:31 +08:00
世界 a89aac4c67 release: Skip override version for iOS 2025-07-08 13:12:31 +08:00
世界 cdea3f63d4 release: Skip override version for iOS 2025-07-08 13:12:31 +08:00
iikiraand世界 39ef5ddde0 Fix UDP DNS server crash
Signed-off-by: iikira <i2@mail.iikira.com>
2025-07-08 13:12:31 +08:00
iikiraand世界 40a6260f6e Fix UDP DNS server crash
Signed-off-by: iikira <i2@mail.iikira.com>
2025-07-08 13:12:31 +08:00
ReleTorand世界 7e86c9af95 Fix fetch ECH configs 2025-07-08 13:12:30 +08:00
ReleTorand世界 a5e47f4e0f Fix fetch ECH configs 2025-07-08 13:12:30 +08:00
世界 e8d50fe5b9 Allow direct outbounds without domain_resolver 2025-07-08 13:12:30 +08:00
世界 ac7bc587cb Allow direct outbounds without domain_resolver 2025-07-08 13:12:30 +08:00
世界 a5f84c2977 Fix Tailscale dialer 2025-07-08 13:12:30 +08:00
世界 4e11a3585a Fix Tailscale dialer 2025-07-08 13:12:30 +08:00
dyhkwongand世界 8fb559781c Fix DNS over QUIC stream close 2025-07-08 13:12:30 +08:00
dyhkwongand世界 63d3e9f6e5 Fix DNS over QUIC stream close 2025-07-08 13:12:30 +08:00
anytls世界anytls <anytls>
2bf5ca0c86 Update anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:30 +08:00
anytls世界anytls <anytls>
d115e36ed8 Update anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:30 +08:00
Rambling2076and世界 32b2b1060c Fix missing with_tailscale in Dockerfile
Signed-off-by: Rambling2076 <Rambling2076@proton.me>
2025-07-08 13:12:29 +08:00
Rambling2076and世界 af56b1a950 Fix missing with_tailscale in Dockerfile
Signed-off-by: Rambling2076 <Rambling2076@proton.me>
2025-07-08 13:12:29 +08:00
世界 35242d198b Fail when default DNS server not found 2025-07-08 13:12:28 +08:00
世界 f9999a76fe Fail when default DNS server not found 2025-07-08 13:12:28 +08:00
世界 2ea485bbe0 Update gVisor to 20250319.0 2025-07-08 13:12:28 +08:00
世界 42eb3841a1 Update gVisor to 20250319.0 2025-07-08 13:12:28 +08:00
世界 96f078e252 Explicitly reject detour to empty direct outbounds 2025-07-08 13:12:28 +08:00
世界 fb622ccbdf Explicitly reject detour to empty direct outbounds 2025-07-08 13:12:28 +08:00
世界 ee3e62bfa4 Add netns support 2025-07-08 13:12:28 +08:00
世界 d2dc3ddf72 Add netns support 2025-07-08 13:12:28 +08:00
世界 076ed3c69a Add wildcard name support for predefined records 2025-07-08 13:12:27 +08:00
世界 e8499452f8 Add wildcard name support for predefined records 2025-07-08 13:12:27 +08:00
世界 7fcff6731d Remove map usage in options 2025-07-08 13:12:27 +08:00
世界 e0a6b31c03 Remove map usage in options 2025-07-08 13:12:27 +08:00
世界 f781598540 Fix unhandled DNS loop 2025-07-08 13:12:27 +08:00
世界 7c923209ad Fix unhandled DNS loop 2025-07-08 13:12:27 +08:00
世界 275ec18c5c Add wildcard-sni support for shadow-tls inbound 2025-07-08 13:12:26 +08:00
世界 bca2bd2fa1 Add wildcard-sni support for shadow-tls inbound 2025-07-08 13:12:26 +08:00
k9982874and世界 6066201331 Add ntp protocol sniffing 2025-07-08 13:12:26 +08:00
k9982874and世界 fa99ca2757 Add ntp protocol sniffing 2025-07-08 13:12:26 +08:00
世界 e41fdfe58a option: Fix marshal legacy DNS options 2025-07-08 13:12:26 +08:00
世界 7073f2a272 option: Fix marshal legacy DNS options 2025-07-08 13:12:26 +08:00
世界 48e643886c Make domain_resolver optional when only one DNS server is configured 2025-07-08 13:12:26 +08:00
世界 390e30ae7b Make domain_resolver optional when only one DNS server is configured 2025-07-08 13:12:26 +08:00
世界 db26a9cc5f Fix DNS lookup context pollution 2025-07-08 13:12:25 +08:00
世界 23cf8c49e0 Fix DNS lookup context pollution 2025-07-08 13:12:25 +08:00
世界 cb56bdbfef Fix http3 DNS server connecting to wrong address 2025-07-08 13:12:25 +08:00
世界 b17a024f6c Fix http3 DNS server connecting to wrong address 2025-07-08 13:12:25 +08:00
Restia-Ashbelland世界 38169d2f5e documentation: Fix typo 2025-07-08 13:12:25 +08:00
Restia-Ashbelland世界 1ed21085bb documentation: Fix typo 2025-07-08 13:12:25 +08:00
anytls世界anytls <anytls>
28ccc3e5da Update sing-anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:24 +08:00
anytls世界anytls <anytls>
56409ff269 Update sing-anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:24 +08:00
k9982874and世界 fe2239266a Fix hosts DNS server 2025-07-08 13:12:24 +08:00
k9982874and世界 0c523980ff Fix hosts DNS server 2025-07-08 13:12:24 +08:00
世界 f11a17ebd1 Fix UDP DNS server crash 2025-07-08 13:12:24 +08:00
世界 32873d06bc Fix UDP DNS server crash 2025-07-08 13:12:24 +08:00
世界 e2916fd9c5 documentation: Fix missing ip_accept_any DNS rule option 2025-07-08 13:12:23 +08:00
世界 4accaccf77 documentation: Fix missing ip_accept_any DNS rule option 2025-07-08 13:12:23 +08:00
世界 e9e6efcdde Fix anytls dialer usage 2025-07-08 13:12:23 +08:00
世界 ff416aacaf Fix anytls dialer usage 2025-07-08 13:12:23 +08:00
世界 6cae3e54d1 Move predefined DNS server to rule action 2025-07-08 13:12:23 +08:00
世界 b97947e8ac Move predefined DNS server to rule action 2025-07-08 13:12:23 +08:00
世界 fffada5666 Fix domain resolver on direct outbound 2025-07-08 13:12:22 +08:00
世界 dfcd9fb8c3 Fix domain resolver on direct outbound 2025-07-08 13:12:22 +08:00
Zephyrusoand世界 4c4b86dd3a Fix missing AnyTLS display name 2025-07-08 13:12:22 +08:00
Zephyrusoand世界 803811568e Fix missing AnyTLS display name 2025-07-08 13:12:22 +08:00
anytls世界anytls <anytls>
5bf2965a2a Update sing-anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:22 +08:00
anytls世界anytls <anytls>
50b0bd5c39 Update sing-anytls
Co-authored-by: anytls <anytls>
2025-07-08 13:12:22 +08:00
Esteland世界 30717367ee documentation: Fix typo
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
2025-07-08 13:12:22 +08:00
Esteland世界 2d02b2b1cf documentation: Fix typo
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
2025-07-08 13:12:22 +08:00
TargetLockedand世界 9a6de83dc5 Fix parsing legacy DNS options 2025-07-08 13:12:21 +08:00
TargetLockedand世界 456fbecf16 Fix parsing legacy DNS options 2025-07-08 13:12:21 +08:00
世界 854ce0d574 Fix DNS fallback 2025-07-08 13:12:21 +08:00
世界 668923c392 Fix DNS fallback 2025-07-08 13:12:21 +08:00
世界 092c2919d8 documentation: Fix missing hosts DNS server 2025-07-08 13:12:20 +08:00
世界 c51e9cbe06 documentation: Fix missing hosts DNS server 2025-07-08 13:12:20 +08:00
anytls世界anytls <anytls>
ec535f3580 Add MinIdleSession option to AnyTLS outbound
Co-authored-by: anytls <anytls>
2025-07-08 13:12:20 +08:00
anytls世界anytls <anytls>
60b451e6cf Add MinIdleSession option to AnyTLS outbound
Co-authored-by: anytls <anytls>
2025-07-08 13:12:20 +08:00
ReleTorand世界 bf04873287 documentation: Minor fixes 2025-07-08 13:12:20 +08:00
ReleTorand世界 3e35390d8f documentation: Minor fixes 2025-07-08 13:12:20 +08:00
libtry486and世界 7063ef8e57 documentation: Fix typo
fix typo

Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
2025-07-08 13:12:20 +08:00
libtry486and世界 f2dad289fb documentation: Fix typo
fix typo

Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
2025-07-08 13:12:20 +08:00
Alireza Ahmadiand世界 8d36c53e48 Fix Outbound deadlock 2025-07-08 13:12:19 +08:00
Alireza Ahmadiand世界 b4a8fa59f5 Fix Outbound deadlock 2025-07-08 13:12:19 +08:00
世界 ffd7ba5ecf documentation: Fix AnyTLS doc 2025-07-08 13:12:19 +08:00
世界 73de2a7d07 documentation: Fix AnyTLS doc 2025-07-08 13:12:19 +08:00
anytlsand世界 fdaffeb6f5 Add AnyTLS protocol 2025-07-08 13:12:19 +08:00
anytlsand世界 1699a7ce33 Add AnyTLS protocol 2025-07-08 13:12:19 +08:00
世界 26c2b696a9 Migrate to stdlib ECH support 2025-07-08 13:12:19 +08:00
世界 7743c6e881 Migrate to stdlib ECH support 2025-07-08 13:12:19 +08:00
世界 2a623c4b2f Add fallback local DNS server for iOS 2025-07-08 13:12:18 +08:00
世界 9a5f69f435 Add fallback local DNS server for iOS 2025-07-08 13:12:18 +08:00
世界 1345ed2ff2 Get darwin local DNS server from libresolv 2025-07-08 13:12:18 +08:00
世界 5c4211e849 Get darwin local DNS server from libresolv 2025-07-08 13:12:18 +08:00
世界 29d355597f Improve resolve action 2025-07-08 13:12:18 +08:00
世界 c1189e2a7b Improve resolve action 2025-07-08 13:12:18 +08:00
世界 d43d3773be Add back port hopping to hysteria 1 2025-07-08 13:12:17 +08:00
世界 f18889369f Add back port hopping to hysteria 1 2025-07-08 13:12:17 +08:00
xchacha20-poly1305and世界 17a60406fc Remove single quotes of raw Moziila certs 2025-07-08 13:12:17 +08:00
xchacha20-poly1305and世界 91c7b638e8 Remove single quotes of raw Moziila certs 2025-07-08 13:12:17 +08:00
世界 71322d2b4c Add Tailscale endpoint 2025-07-08 13:12:16 +08:00
世界 6f793a0273 Add Tailscale endpoint 2025-07-08 13:12:16 +08:00
世界 14d96bb327 Build legacy binaries with latest Go 2025-07-08 13:12:16 +08:00
世界 0f6c417c3c Build legacy binaries with latest Go 2025-07-08 13:12:16 +08:00
世界 c706aab473 documentation: Remove outdated icons 2025-07-08 13:12:16 +08:00
世界 c830e9a634 documentation: Remove outdated icons 2025-07-08 13:12:16 +08:00
世界 473639bca4 documentation: Certificate store 2025-07-08 13:12:16 +08:00
世界 e809623ec9 documentation: Certificate store 2025-07-08 13:12:16 +08:00
世界 5dd419904d documentation: TLS fragment 2025-07-08 13:12:15 +08:00
世界 061276902b documentation: TLS fragment 2025-07-08 13:12:15 +08:00
世界 e22bf653a4 documentation: Outbound domain resolver 2025-07-08 13:12:15 +08:00
世界 fa6f7d396e documentation: Outbound domain resolver 2025-07-08 13:12:15 +08:00
世界 94ba4dc49b documentation: Refactor DNS 2025-07-08 13:12:15 +08:00
世界 23666a9230 documentation: Refactor DNS 2025-07-08 13:12:15 +08:00
世界 a5db391fcf Add certificate store 2025-07-08 13:12:14 +08:00
世界 17576e9f66 Add certificate store 2025-07-08 13:12:14 +08:00
世界 3d55cef5f2 Add TLS fragment support 2025-07-08 13:12:14 +08:00
世界 90ec9c8bcb Add TLS fragment support 2025-07-08 13:12:14 +08:00
世界 2afbe96ea0 refactor: Outbound domain resolver 2025-07-08 13:12:14 +08:00
世界 988ac62a1b refactor: Outbound domain resolver 2025-07-08 13:12:14 +08:00
世界 f75ade1991 refactor: DNS 2025-07-08 13:12:14 +08:00
世界 3016338e34 refactor: DNS 2025-07-08 13:12:14 +08:00
世界 56dca9397f Bump version 2025-07-08 13:11:13 +08:00
世界 bc35aca017 Bump version 2025-07-08 13:11:13 +08:00
世界 e947adf743 Fix hy2 server crash 2025-07-08 13:11:13 +08:00
世界 281d52a1ea Fix hy2 server crash 2025-07-08 13:11:13 +08:00
世界 15d412d9e5 Fix DNS reject check 2025-07-07 13:57:37 +08:00
世界 b8502759b5 Fix DNS reject check 2025-07-07 13:57:37 +08:00
ShtormandGitHub 73ccb567a6 Update README.md
Signed-off-by: Shtorm <108103062+shtorm-7@users.noreply.github.com>
2025-07-06 21:16:54 +03:00
Shtorm 3f97424224 Add tunnel 2025-07-06 18:31:06 +03:00
世界 8cafca9315 Fix v2rayhttp crash 2025-07-03 21:48:10 +08:00
世界 6f804adf39 Fix v2rayhttp crash 2025-07-03 21:48:10 +08:00
a1c1bdd14b documentation: Fix typo
Co-authored-by: chenqixin <chenqixin@bytedance.com>
2025-06-29 18:54:05 +08:00
36db31c55a documentation: Fix typo
Co-authored-by: chenqixin <chenqixin@bytedance.com>
2025-06-29 18:54:05 +08:00
世界 cff837bc7b Fix logger for acme 2025-06-29 18:44:40 +08:00
世界 4dbbf59c82 Fix logger for acme 2025-06-29 18:44:40 +08:00
世界 5f6bdefddf release: Fix xcode version 2025-06-29 18:44:40 +08:00
世界 832eb4458d release: Fix xcode version 2025-06-29 18:44:40 +08:00
dyhkwongandGitHub 9e9566b364 Fix inbound with v2ray transport missing InboundOptions 2025-06-25 13:20:00 +08:00
dyhkwongandGitHub 2cf989d306 Fix inbound with v2ray transport missing InboundOptions 2025-06-25 13:20:00 +08:00
世界 e19aa69688 Also skip duplicate sniff for TCP 2025-06-21 12:57:27 +08:00
世界 7d3ee29bd0 Also skip duplicate sniff for TCP 2025-06-21 12:57:27 +08:00
世界 a6315e5313 Fix log for rejected connections 2025-06-21 12:57:26 +08:00
世界 cba0e46aba Fix log for rejected connections 2025-06-21 12:57:26 +08:00
Shtorm 54b373a73e Merge tag 'v1.11.14' into HEAD 2025-06-19 20:18:51 +03:00
世界 31f53dd168 Bump version 2025-06-19 11:57:44 +08:00
世界 9b8ab3e61e Bump version 2025-06-19 11:57:44 +08:00
dyhkwongandGitHub 44b478b005 Fix: macOS udp find process should use unspecified fallback
https://github.com/Dreamacro/clash/commit/be8d63ba8f70a6f4e7b240899cd2903a77243c24
2025-06-18 08:34:59 +08:00
dyhkwongandGitHub 47f18e823a Fix: macOS udp find process should use unspecified fallback
https://github.com/Dreamacro/clash/commit/be8d63ba8f70a6f4e7b240899cd2903a77243c24
2025-06-18 08:34:59 +08:00
世界 509754f24e Fix gLazyConn race 2025-06-17 14:24:11 +08:00
世界 2d1b824b62 Fix gLazyConn race 2025-06-17 14:24:11 +08:00
Shtorm f842e3f34c Add new examples 2025-06-15 22:23:42 +03:00
Shtorm 2105f52fb3 Format examples 2025-06-15 22:23:25 +03:00
Shtorm 9f3acf497b Fix Range 2025-06-15 22:21:58 +03:00
Shtorm fd0f5c50fb Add sdns transport 2025-06-15 20:47:05 +03:00
Shtorm a7f236a8e5 Fix XHTTP Fqdn 2025-06-15 19:41:22 +03:00
Shtorm 3a264698e2 Fix WARP endpoint error 2025-06-15 19:40:42 +03:00
Shtorm d9468a6fda Fix interrupt_exist_connections 2025-06-15 19:32:14 +03:00
Shtorm 221eeff09d Add unified delay 2025-06-15 19:24:09 +03:00
Shtorm 7fce83332a Add mieru protocol 2025-06-15 18:04:27 +03:00
世界 60eb787dcf Fix slowOpenConn 2025-06-12 08:05:04 +08:00
世界 d511698f3f Fix slowOpenConn 2025-06-12 08:05:04 +08:00
世界 44cf0503df Fix default network strategy 2025-06-12 08:05:04 +08:00
世界 cb435ea232 Fix default network strategy 2025-06-12 08:05:04 +08:00
Shtorm 1214785d12 Merge tag 'v1.11.13' into HEAD 2025-06-08 22:43:21 +03:00
Shtorm 53f7276874 Add examples 2025-06-08 22:38:32 +03:00
Shtorm 6e756dedc7 Resolve conflicts 2025-06-08 19:54:17 +03:00
Shtorm 3d8c74efa4 refactor: WARP 2025-06-08 19:51:17 +03:00
Shtorm db5da47a9d Add xhttp transport 2025-06-08 19:35:59 +03:00
世界 b5f62b2e9c Fix leak in hijack-dns 2025-06-06 14:28:09 +08:00
世界 43a9016c83 Fix leak in hijack-dns 2025-06-06 14:28:09 +08:00
世界 4771b63da9 Bump version 2025-06-04 23:32:10 +08:00
世界 255068fd40 Bump version 2025-06-04 23:32:10 +08:00
世界 3724b53a89 Fix v2ray websocket transport 2025-06-04 23:23:36 +08:00
世界 098a00b025 Fix v2ray websocket transport 2025-06-04 23:23:36 +08:00
世界 a1658c603e Bump version 2025-06-04 20:06:38 +08:00
世界 dba0b5276b Bump version 2025-06-04 20:06:38 +08:00
Sentsukiand世界 5f40bcabb6 documentation: Fix typo
Signed-off-by: Sentsuki <52487960+Sentsuki@users.noreply.github.com>
2025-06-04 20:06:38 +08:00
Sentsukiand世界 78ae935468 documentation: Fix typo
Signed-off-by: Sentsuki <52487960+Sentsuki@users.noreply.github.com>
2025-06-04 20:06:38 +08:00
Mahdiand世界 0356fc26c9 Fix nil logger at v2rayhttp server 2025-06-04 20:06:20 +08:00
Mahdiand世界 3ea5f76470 Fix nil logger at v2rayhttp server 2025-06-04 20:06:20 +08:00
世界 f5913160d9 Fix TUIC read buffer 2025-06-04 20:03:51 +08:00
世界 b4d294c05e Fix TUIC read buffer 2025-06-04 20:03:51 +08:00
Shtorm dfc6fce8bb Added WARP endpoint 2025-06-01 22:06:34 +03:00
Shtorm 756acc77e9 Fix endpoint manager locks 2025-05-29 22:48:15 +03:00
世界 e1c4e30f82 Fix ws closed error message 2025-05-27 14:30:07 +08:00
世界 83cf5f5c6a Fix ws closed error message 2025-05-27 14:30:07 +08:00
世界 2e9dae5ff4 Fix vmess read request 2025-05-27 14:11:05 +08:00
世界 e7b3a8eebe Fix vmess read request 2025-05-27 14:11:05 +08:00
世界 9e96ccc23e Fix none method read buffer 2025-05-27 14:03:48 +08:00
世界 ee3a42a67e Fix none method read buffer 2025-05-27 14:03:48 +08:00
世界 fef4496d38 Fix sniff action 2025-05-26 18:24:35 +08:00
世界 50227c0f5f Fix sniff action 2025-05-26 18:24:35 +08:00
Shtorm ccf46f62d1 Integrate AmneziaWG 2025-05-24 23:54:15 +03:00
世界 234481b476 Fix RoutePacketConnectionEx 2025-05-24 08:14:43 +08:00
世界 bc5eb1e1a5 Fix RoutePacketConnectionEx 2025-05-24 08:14:43 +08:00
世界 23541b235e Remove wrong ALPNs in DOH/DOH3 2025-05-24 08:00:13 +08:00
世界 995267a042 Remove wrong ALPNs in DOH/DOH3 2025-05-24 08:00:13 +08:00
世界 ce1a4f05a5 Fix interface finder 2025-05-23 10:57:38 +08:00
世界 41226a6075 Fix interface finder 2025-05-23 10:57:38 +08:00
世界 70f05dcee9 Fix update route address set 2025-05-20 19:46:54 +08:00
世界 81d32181ce Fix update route address set 2025-05-20 19:46:54 +08:00
世界 84f87997bf Bump version 2025-05-18 16:48:44 +08:00
世界 c5ecca3938 Bump version 2025-05-18 16:48:44 +08:00
世界 d6b0585cf9 Fix DNS reject response 2025-05-13 18:05:31 +08:00
世界 900888731c Fix DNS reject response 2025-05-13 18:05:31 +08:00
世界 f46d6d7cce Fix set edns0 subnet 2025-05-07 15:12:17 +08:00
世界 13e648e4b1 Fix set edns0 subnet 2025-05-07 15:12:17 +08:00
世界 255d839aa9 Bump version 2025-05-05 09:37:47 +08:00
世界 aff12ff671 Bump version 2025-05-05 09:37:47 +08:00
世界 e4359b29ca Fix allocator put 2025-05-05 09:37:44 +08:00
世界 101fb88255 Fix allocator put 2025-05-05 09:37:44 +08:00
世界 7835e6cfd1 Undeprecate the block outbound 2025-05-04 18:45:53 +08:00
世界 8b489354e4 Undeprecate the block outbound 2025-05-04 18:45:53 +08:00
世界 32d76d0cd0 Fix missing read waiter for cancelers 2025-05-04 18:14:21 +08:00
世界 7dea6eb7a6 Fix missing read waiter for cancelers 2025-05-04 18:14:21 +08:00
世界 0d55da50cd Make rule_set.format optional 2025-05-04 18:14:21 +08:00
世界 af1bfe4e3e Make rule_set.format optional 2025-05-04 18:14:21 +08:00
世界 411d0e19ce Update smux to v1.5.34 2025-04-30 19:39:15 +08:00
世界 d574e9eb52 Update smux to v1.5.34 2025-04-30 19:39:15 +08:00
世界 678d6c7b39 Fix hysteria bytes format 2025-04-29 20:45:19 +08:00
世界 2d7df1e1f2 Fix hysteria bytes format 2025-04-29 20:45:19 +08:00
世界 9405545311 Fix counter position in auto redirect dnat rules 2025-04-28 11:20:23 +08:00
世界 1c0ffcf5b1 Fix counter position in auto redirect dnat rules 2025-04-28 11:20:23 +08:00
世界 af06ffdd7e Bump version 2025-04-27 21:33:31 +08:00
世界 348cc39975 Bump version 2025-04-27 21:33:31 +08:00
世界 14e58a501d Fix usages of wireguard listener 2025-04-27 21:29:23 +08:00
世界 987899f94a Fix usages of wireguard listener 2025-04-27 21:29:23 +08:00
世界 7208efe294 Fix panic on some stupid input 2025-04-25 16:03:58 +08:00
世界 d8b2d5142f Fix panic on some stupid input 2025-04-25 16:03:58 +08:00
世界 1b2ee441c4 Fix ssh outbound 2025-04-25 16:03:57 +08:00
世界 134802d1ee Fix ssh outbound 2025-04-25 16:03:57 +08:00
世界 d7b90cfc3f Fix wireguard listening 2025-04-25 16:03:57 +08:00
世界 e5e81b4de1 Fix wireguard listening 2025-04-25 16:03:57 +08:00
世界 324c487233 option: Fix listable again and again 2025-04-25 16:03:57 +08:00
世界 300c961efa option: Fix listable again and again 2025-04-25 16:03:57 +08:00
世界 b68fd589bc option: Fix omitempty reject method 2025-04-25 16:03:57 +08:00
世界 7c7f512405 option: Fix omitempty reject method 2025-04-25 16:03:57 +08:00
世界 12fa01a3ea release: Fix apt-get install 2025-04-25 16:03:57 +08:00
世界 03e8d029c2 release: Fix apt-get install 2025-04-25 16:03:57 +08:00
世界 c79ec0fa57 Fix set wireguard reserved on Linux 2025-04-25 16:03:57 +08:00
世界 787b5f1931 Fix set wireguard reserved on Linux 2025-04-25 16:03:57 +08:00
世界 f2ae73bbb2 Fix vmess working with zero uuids 2025-04-25 16:03:57 +08:00
世界 56a7624618 Fix vmess working with zero uuids 2025-04-25 16:03:57 +08:00
世界 389f5e3911 Fix hysteria1 server panic 2025-04-25 16:03:57 +08:00
世界 3a84acf122 Fix hysteria1 server panic 2025-04-25 16:03:57 +08:00
世界 dca0703ef8 Fix DNS crash 2025-04-25 16:03:57 +08:00
世界 f600e02e47 Fix DNS crash 2025-04-25 16:03:57 +08:00
世界 5a479211cd Fix overriding address 2025-04-22 14:55:44 +08:00
世界 e6d19de58a Fix overriding address 2025-04-22 14:55:44 +08:00
dyhkwongandGitHub a43bc2fa93 Fix sniffer errors override each others
* Fix sniffer errors override each others

* Do not return ErrNeedMoreData if header is not expected
2025-04-22 14:44:55 +08:00
dyhkwongandGitHub f2bbf6b2aa Fix sniffer errors override each others
* Fix sniffer errors override each others

* Do not return ErrNeedMoreData if header is not expected
2025-04-22 14:44:55 +08:00
ca56ee6c43 Fix websocket detour
Signed-off-by: trimgop <20010323+trimgop@users.noreply.github.com>
Co-authored-by: trimgop <20010323+trimgop@users.noreply.github.com>
2025-04-22 14:44:34 +08:00
c54d50fd36 Fix websocket detour
Signed-off-by: trimgop <20010323+trimgop@users.noreply.github.com>
Co-authored-by: trimgop <20010323+trimgop@users.noreply.github.com>
2025-04-22 14:44:34 +08:00
世界 f824386ae8 release: Fix packages 2025-04-19 19:12:01 +08:00
世界 6a051054db release: Fix packages 2025-04-19 19:12:01 +08:00
世界 9f056a0241 Bump version 2025-04-18 08:54:40 +08:00
世界 49498f6439 Bump version 2025-04-18 08:54:40 +08:00
世界 5e0d0e57f2 release: Add openwrt packages 2025-04-18 08:54:40 +08:00
世界 144a890c71 release: Add openwrt packages 2025-04-18 08:54:40 +08:00
世界 c107dd847b Fix urltest outbound 2025-04-18 08:54:40 +08:00
世界 afb4993445 Fix urltest outbound 2025-04-18 08:54:40 +08:00
世界 93502ceb3c Fix wireguard endpoint 2025-04-18 08:54:40 +08:00
世界 4c9455b944 Fix wireguard endpoint 2025-04-18 08:54:40 +08:00
世界 b196dd3138 Fix override_port in direct inbound 2025-04-16 17:04:13 +08:00
世界 5fdc051a08 Fix override_port in direct inbound 2025-04-16 17:04:13 +08:00
世界 c77dfb3b83 documentation: Update actual behaviors of auto_redirect and strict_route 2025-04-12 13:06:16 +08:00
世界 cb68a40c43 documentation: Update actual behaviors of auto_redirect and strict_route 2025-04-12 13:06:16 +08:00
纳西妲 · Nahidaand世界 e8c1e4802b Fix build will fail when use space to split each tag 2025-04-12 13:06:16 +08:00
纳西妲 · Nahidaand世界 023218e6e7 Fix build will fail when use space to split each tag 2025-04-12 13:06:16 +08:00
世界 56572a559e Minor fixes 2025-04-12 13:06:15 +08:00
世界 2a24b94b8d Minor fixes 2025-04-12 13:06:15 +08:00
世界 771d2e71e0 Fix NTP service 2025-04-12 13:06:15 +08:00
世界 c6531cf184 Fix NTP service 2025-04-12 13:06:15 +08:00
世界 db23cbd4e5 Improve auto redirect 2025-04-12 13:06:10 +08:00
世界 d4fa0ed349 Improve auto redirect 2025-04-12 13:06:10 +08:00
世界 d750f7d5c4 Bump version 2025-04-08 14:34:09 +08:00
世界 10874d2dc4 Bump version 2025-04-08 14:34:09 +08:00
Fei1Yangand世界 69b51f39c3 Mark config file as noreplace for rpm 2025-04-08 14:21:08 +08:00
Fei1Yangand世界 5adaf1ac75 Mark config file as noreplace for rpm 2025-04-08 14:21:08 +08:00
世界 70ea6fde44 Fix windows process searcher 2025-04-08 14:16:27 +08:00
世界 9668ea69b8 Fix windows process searcher 2025-04-08 14:16:27 +08:00
testingand世界 72b37deea7 documentation: Fix typo
Signed-off-by: testing <58134720+testing765@users.noreply.github.com>
2025-04-08 14:16:23 +08:00
testingand世界 ae9bc7acf1 documentation: Fix typo
Signed-off-by: testing <58134720+testing765@users.noreply.github.com>
2025-04-08 14:16:23 +08:00
世界 ba6819e46e option: Fix listable 2025-04-08 14:16:23 +08:00
世界 594ee480a2 option: Fix listable 2025-04-08 14:16:23 +08:00
世界 b56a752547 Fix no_drop not work 2025-04-08 14:16:23 +08:00
世界 a15b5a2463 Fix no_drop not work 2025-04-08 14:16:23 +08:00
Mahdiand世界 272c2692e3 Fix conn copy 2025-04-08 14:16:22 +08:00
Mahdiand世界 991e755789 Fix conn copy 2025-04-08 14:16:22 +08:00
世界 b7c20fd165 Improve pause management 2025-04-08 14:16:22 +08:00
世界 97d41ffde8 Improve pause management 2025-04-08 14:16:22 +08:00
世界 fae0d23e78 Fix uTP sniffer 2025-04-08 14:16:22 +08:00
世界 24af0766ac Fix uTP sniffer 2025-04-08 14:16:22 +08:00
世界 f1ad70298f Improve sniffer 2025-04-08 14:16:22 +08:00
世界 af17eaa537 Improve sniffer 2025-04-08 14:16:22 +08:00
世界 aa930c370d Fix hysteria2 close 2025-04-08 14:16:22 +08:00
世界 3adc10a797 Fix hysteria2 close 2025-04-08 14:16:22 +08:00
xchacha20-poly1305and世界 7afbd78b09 Fix multiple trackers 2025-04-08 14:16:22 +08:00
xchacha20-poly1305and世界 5eeef6b28e Fix multiple trackers 2025-04-08 14:16:22 +08:00
世界 0b08d4ce31 Fix DNS sniffer 2025-03-31 20:45:04 +08:00
世界 f4c29840c3 Fix DNS sniffer 2025-03-31 20:45:04 +08:00
世界 68fffff4fb Add duplicate tag check 2025-03-29 23:10:22 +08:00
世界 47fc3ebda4 Add duplicate tag check 2025-03-29 23:10:22 +08:00
世界 63db823f16 Fix DoQ / truncate DNS message 2025-03-29 17:41:22 +08:00
世界 9774a659b0 Fix DoQ / truncate DNS message 2025-03-29 17:41:22 +08:00
世界 89f1bd0ed6 release: Fix read tag 2025-03-27 20:30:57 +08:00
世界 2e4a6de4e7 release: Fix read tag 2025-03-27 20:30:57 +08:00
世界 7434b29f67 Bump version 2025-03-27 18:17:39 +08:00
世界 a530e424e9 Bump version 2025-03-27 18:17:39 +08:00
世界 3cda63fa63 Fix udpnat2 handler again 2025-03-27 18:17:39 +08:00
世界 0bfd487ee9 Fix udpnat2 handler again 2025-03-27 18:17:39 +08:00
世界 e7b86e990b release: Fix workflow 2025-03-27 18:17:39 +08:00
世界 6aae834493 release: Fix workflow 2025-03-27 18:17:39 +08:00
世界 bce8e1c50b Make linter happy 2025-03-24 20:38:42 +08:00
世界 f56131f38e Make linter happy 2025-03-24 20:38:42 +08:00
世界 523e1fd243 Fix crash on udpnat2 handler 2025-03-24 18:14:32 +08:00
世界 273a11d550 Fix crash on udpnat2 handler 2025-03-24 18:14:32 +08:00
世界 c0a42cc44f Fix websocket crash 2025-03-24 17:44:14 +08:00
世界 ae8ce75e41 Fix websocket crash 2025-03-24 17:44:14 +08:00
世界 a1b2551a6f release: Replace goreleaser build with scripts 2025-03-24 13:48:37 +08:00
世界 d6d94b689f release: Replace goreleaser build with scripts 2025-03-24 13:48:37 +08:00
世界 748e668b06 release: Use fake goreleaser key 2025-03-21 22:25:51 +08:00
世界 30d785f1ee release: Use fake goreleaser key 2025-03-21 22:25:51 +08:00
世界 b07b30ab86 Fix connectionCopyEarly 2025-03-21 10:51:16 +08:00
世界 db5ec3cdfc Fix connectionCopyEarly 2025-03-21 10:51:16 +08:00
世界 d9bcff7756 Fix socks5 UDP 2025-03-16 14:46:44 +08:00
世界 9aca54d039 Fix socks5 UDP 2025-03-16 14:46:44 +08:00
世界 9de9796f58 Fix processing multiple sniffs 2025-03-16 09:21:54 +08:00
世界 d55d5009c2 Fix processing multiple sniffs 2025-03-16 09:21:54 +08:00
世界 cc1667f1af Fix copy early conn 2025-03-15 08:09:04 +08:00
世界 4f3ee61104 Fix copy early conn 2025-03-15 08:09:04 +08:00
世界 e2c15ef566 Fix httpupgrade crash 2025-03-14 17:17:28 +08:00
世界 96eb98c00a Fix httpupgrade crash 2025-03-14 17:17:28 +08:00
世界 a7baf91fec Fix context in v2ray http transports 2025-03-14 17:07:17 +08:00
世界 68ce9577c6 Fix context in v2ray http transports 2025-03-14 17:07:17 +08:00
世界 c90b26c630 Downgrade goreleaser to stable since nfpm fixed 2025-03-13 18:53:19 +08:00
世界 3ae036e997 Downgrade goreleaser to stable since nfpm fixed 2025-03-13 18:53:19 +08:00
世界 646251d081 release: Fix goreleaser version 2025-03-12 16:15:50 +08:00
世界 5da2d1d470 release: Fix goreleaser version 2025-03-12 16:15:50 +08:00
世界 d00c1a97df Bump version 2025-03-11 20:18:34 +08:00
世界 8e2baf40f1 Bump version 2025-03-11 20:18:34 +08:00
世界 6de7964724 platform: Fix android start 2025-03-11 20:18:34 +08:00
世界 c24c40dfee platform: Fix android start 2025-03-11 20:18:34 +08:00
世界 b551a4cfec Fix udp nat for fakeip 2025-03-11 19:09:27 +08:00
世界 32e52ce1ed Fix udp nat for fakeip 2025-03-11 19:09:27 +08:00
世界 caabaf8e80 release: Use nightly goreleaser to fix rpm bug 2025-03-11 13:29:08 +08:00
世界 ed46438359 release: Use nightly goreleaser to fix rpm bug 2025-03-11 13:29:08 +08:00
世界 3ca89b4f9c Fix resolve domain for WireGuard 2025-03-11 12:02:25 +08:00
世界 0b5490d5a3 Fix resolve domain for WireGuard 2025-03-11 12:02:25 +08:00
0610110de4 Fix grpclite memory leak
Co-authored-by: talrasha007 <talrasha007@gmail.om>
2025-03-10 14:48:02 +08:00
2d73ef511d Fix grpclite memory leak
Co-authored-by: talrasha007 <talrasha007@gmail.om>
2025-03-10 14:48:02 +08:00
Mahdiand世界 4a22325fc7 Fix shadowsocks UoT 2025-03-10 14:47:59 +08:00
Mahdiand世界 63e6c85f6f Fix shadowsocks UoT 2025-03-10 14:47:59 +08:00
世界 8edd4f4659 release: Use latest goreleaser 2025-03-09 15:27:04 +08:00
世界 8946a6d2d0 release: Use latest goreleaser 2025-03-09 15:27:04 +08:00
世界 5483aa5a4a documentation: Fix description of the UoT protocol 2025-03-09 15:26:42 +08:00
世界 d3132645fb documentation: Fix description of the UoT protocol 2025-03-09 15:26:42 +08:00
世界 606a417395 Fix download external ui with query params 2025-03-09 15:26:36 +08:00
世界 373f158fe0 Fix download external ui with query params 2025-03-09 15:26:36 +08:00
世界 318cf7d960 Fix override destination 2025-03-09 15:25:06 +08:00
世界 ce36835fab Fix override destination 2025-03-09 15:25:06 +08:00
世界 1630c5d727 Skip binding to the default interface as it will fail on some Android devices 2025-02-26 07:25:35 +08:00
世界 619fa671d7 Skip binding to the default interface as it will fail on some Android devices 2025-02-26 07:25:35 +08:00
世界 d387a151a1 Bump version 2025-02-24 07:27:55 +08:00
世界 eb07c7a79e Bump version 2025-02-24 07:27:55 +08:00
Gavin Luoand世界 0042ce94f3 release: Fix systemd permissions 2025-02-24 07:27:55 +08:00
Gavin Luoand世界 7eb3535094 release: Fix systemd permissions 2025-02-24 07:27:55 +08:00
世界 9915503aa3 platform: Add update WIFI state func 2025-02-23 08:35:30 +08:00
世界 93b68312cf platform: Add update WIFI state func 2025-02-23 08:35:30 +08:00
世界 21d2c78cdc Fix http.FileServer short write 2025-02-23 08:35:30 +08:00
世界 97ce666e43 Fix http.FileServer short write 2025-02-23 08:35:30 +08:00
世界 3802f283a1 release: Fix update android version 2025-02-23 08:35:30 +08:00
世界 4000e1e66d release: Fix update android version 2025-02-23 08:35:30 +08:00
世界 8464df9f98 Fix crash on route address set update 2025-02-23 08:35:30 +08:00
世界 270740e859 Fix crash on route address set update 2025-02-23 08:35:30 +08:00
世界 5d5f899dea Bump Go to go1.24 2025-02-23 08:35:30 +08:00
世界 6cad142cfe Bump Go to go1.24 2025-02-23 08:35:30 +08:00
世界 0ecad863c5 Fix sniff QUIC hidden in three or more packets 2025-02-18 18:14:59 +08:00
世界 093013687c Fix sniff QUIC hidden in three or more packets 2025-02-18 18:14:59 +08:00
世界 50fd1537df Override version 2025-02-11 15:55:15 +08:00
世界 ff31c469a0 Override version 2025-02-11 15:55:15 +08:00
世界 6b39dbfe48 Bump version 2025-02-11 01:32:14 +08:00
世界 fbe390268c Bump version 2025-02-11 01:32:14 +08:00
世界 50ac369cf5 platform: Update NDK to r28 2025-02-11 01:32:14 +08:00
世界 07ac01dcb7 platform: Update NDK to r28 2025-02-11 01:32:14 +08:00
ReleTorand世界 a14c49cd03 documentation: Fixes 2025-02-11 01:32:14 +08:00
ReleTorand世界 badfdb62cd documentation: Fixes 2025-02-11 01:32:14 +08:00
printferand世界 b904d0eaab documentation: Fix migration links 2025-02-11 01:32:14 +08:00
printferand世界 986a410b30 documentation: Fix migration links 2025-02-11 01:32:14 +08:00
世界 eba7eb9e76 Fix override address 2025-02-11 01:32:14 +08:00
世界 9db2d58545 Fix override address 2025-02-11 01:32:14 +08:00
世界 6b694592a3 Fix respond ICMP echo 2025-02-10 15:12:10 +08:00
世界 4eed46ac59 Fix respond ICMP echo 2025-02-10 15:12:10 +08:00
世界 d8114de66b Fix udpnat2 crash 2025-02-10 15:11:26 +08:00
世界 abc38d1dab Fix udpnat2 crash 2025-02-10 15:11:26 +08:00
世界 602180e5fd release: Skip testflight when another build in review 2025-02-06 12:02:47 +08:00
世界 8d6c4f1289 release: Skip testflight when another build in review 2025-02-06 12:02:47 +08:00
世界 b99105507a Fix override UDP destination 2025-02-06 11:20:35 +08:00
世界 a2d40eb8b8 Fix override UDP destination 2025-02-06 11:20:35 +08:00
世界 01fd27a532 Update dependencies 2025-02-06 09:08:52 +08:00
世界 17b502bb4b Update dependencies 2025-02-06 09:08:52 +08:00
世界 eef8802310 Update quic-go to v0.49.0 2025-02-06 08:50:21 +08:00
世界 a0d4421085 Update quic-go to v0.49.0 2025-02-06 08:50:21 +08:00
世界 a504b918f5 Fix panic in auto-redirect initialize 2025-02-06 08:49:25 +08:00
世界 0d443072d1 Fix panic in auto-redirect initialize 2025-02-06 08:49:25 +08:00
世界 b79bc2d350 Fix missing ENOTCONN in IsClosed check 2025-02-06 08:48:49 +08:00
世界 c9fb99b799 Fix missing ENOTCONN in IsClosed check 2025-02-06 08:48:49 +08:00
世界 4c9cd3303c Bump version 2025-02-05 09:59:52 +08:00
世界 92d245ad04 Bump version 2025-02-05 09:59:52 +08:00
世界 8a7e2e46f9 Fix crash on remote rule-set stop 2025-02-05 08:58:10 +08:00
世界 0908627297 Fix crash on remote rule-set stop 2025-02-05 08:58:10 +08:00
世界 b82bf16ebe Minor updates 2025-02-01 19:49:33 +08:00
世界 7f79458b4f Minor updates 2025-02-01 19:49:33 +08:00
世界 3bc90eef10 Fix rule-set not closed 2025-02-01 19:49:33 +08:00
世界 9b4c11ba95 Fix rule-set not closed 2025-02-01 19:49:33 +08:00
世界 81f01eddcb Fix local rule-set not updated 2025-02-01 19:42:21 +08:00
世界 27c31eac5d Fix local rule-set not updated 2025-02-01 19:42:21 +08:00
世界 600dbac148 Fix missing handshake for early conn 2025-01-31 12:57:35 +08:00
世界 bab8dc0b82 Fix missing handshake for early conn 2025-01-31 12:57:35 +08:00
世界 68f408c7d7 Bump version 2025-01-30 15:09:54 +08:00
世界 d09d2fb665 Bump version 2025-01-30 15:09:54 +08:00
世界 a683de96c6 Do not set address sets to routes on Apple platforms
Network Extension was observed to stop for unknown reasons
2025-01-27 13:40:39 +08:00
世界 e64cf3b7df Do not set address sets to routes on Apple platforms
Network Extension was observed to stop for unknown reasons
2025-01-27 13:40:39 +08:00
世界 695b9ad568 documentation: Bump version 2025-01-27 10:53:14 +08:00
世界 9b73222314 documentation: Bump version 2025-01-27 10:53:14 +08:00
世界 ec18305131 release: Update NDK to r28-beta3 2025-01-27 10:53:14 +08:00
世界 3923b57abf release: Update NDK to r28-beta3 2025-01-27 10:53:14 +08:00
世界 1999f13099 documentation: Fix typo 2025-01-27 10:04:07 +08:00
世界 4807e64609 documentation: Fix typo 2025-01-27 10:04:07 +08:00
世界 92b6af35d7 Fix rule-set upgrade command 2025-01-27 09:50:27 +08:00
世界 eeb37d89f1 Fix rule-set upgrade command 2025-01-27 09:50:27 +08:00
世界 a36ea57a60 Fix legacy routes 2025-01-27 09:50:27 +08:00
世界 08c1ec4b7e Fix legacy routes 2025-01-27 09:50:27 +08:00
HystericalDragonand世界 8531a94332 Fix endpoints not close 2025-01-27 09:50:27 +08:00
HystericalDragonand世界 6b4cf67add Fix endpoints not close 2025-01-27 09:50:27 +08:00
世界 ac373b39ad Fix tests 2025-01-13 15:14:30 +08:00
世界 e65926fd08 Fix tests 2025-01-13 15:14:30 +08:00
世界 73a8a35863 Fix system time 2025-01-13 15:14:30 +08:00
世界 f2ec319fe1 Fix system time 2025-01-13 15:14:30 +08:00
世界 b06bd82c47 Add port hopping for hysteria2 2025-01-13 15:14:30 +08:00
世界 32377a61b7 Add port hopping for hysteria2 2025-01-13 15:14:30 +08:00
世界 8dff0f30b9 tun: Set address sets to routes 2025-01-13 15:14:30 +08:00
世界 7aac801ccd tun: Set address sets to routes 2025-01-13 15:14:30 +08:00
世界 b3aeb208a7 Fix default dialer on legacy xiaomi systems 2025-01-13 15:14:30 +08:00
世界 96fdf59ee4 Fix default dialer on legacy xiaomi systems 2025-01-13 15:14:30 +08:00
世界 f9b2336887 Add rule-set merge command 2025-01-13 15:14:30 +08:00
世界 50b8f3ab94 Add rule-set merge command 2025-01-13 15:14:30 +08:00
世界 15ae875478 Fix DNS match 2025-01-13 15:14:30 +08:00
世界 ff7aaf977b Fix DNS match 2025-01-13 15:14:30 +08:00
世界 8b9d1cc626 Fix domain strategy 2025-01-13 15:14:30 +08:00
世界 9a1efbe54d Fix domain strategy 2025-01-13 15:14:30 +08:00
世界 1410a4b977 Fix time service 2025-01-13 15:14:30 +08:00
世界 906c21f458 Fix time service 2025-01-13 15:14:30 +08:00
世界 b25ef0762f Fix socks5 UDP implementation 2025-01-13 15:14:30 +08:00
世界 d5e7af7a7e Fix socks5 UDP implementation 2025-01-13 15:14:30 +08:00
世界 a3b1231342 clash-api: Fix missing endpoints 2025-01-13 15:14:30 +08:00
世界 4d41f03bd5 clash-api: Fix missing endpoints 2025-01-13 15:14:30 +08:00
世界 20cbf59784 hysteria2: Add more masquerade options 2025-01-13 15:14:30 +08:00
世界 30704a15a7 hysteria2: Add more masquerade options 2025-01-13 15:14:30 +08:00
世界 a8a9f7d476 Improve timeouts 2025-01-13 15:14:30 +08:00
世界 83889178ed Improve timeouts 2025-01-13 15:14:30 +08:00
世界 00d23d275d Add UDP timeout route option 2025-01-13 15:14:30 +08:00
世界 1d2720bf5e Add UDP timeout route option 2025-01-13 15:14:30 +08:00
世界 070ad551c3 Make GSO adaptive 2025-01-13 15:14:30 +08:00
世界 c4b6d0eadb Make GSO adaptive 2025-01-13 15:14:30 +08:00
世界 9cc94823e3 Fix lint 2025-01-13 15:14:30 +08:00
世界 0c66888691 Fix lint 2025-01-13 15:14:30 +08:00
世界 44d5411d5f refactor: WireGuard endpoint 2025-01-13 15:14:30 +08:00
世界 68781387fe refactor: WireGuard endpoint 2025-01-13 15:14:30 +08:00
世界 c9804d8b81 refactor: connection manager 2025-01-13 15:14:30 +08:00
世界 fd299a0961 refactor: connection manager 2025-01-13 15:14:30 +08:00
世界 0e227f4f22 documentation: Fix typo 2025-01-13 15:14:30 +08:00
世界 285a82050c documentation: Fix typo 2025-01-13 15:14:30 +08:00
世界 9dcabfd266 Add override destination to route options 2025-01-13 15:14:30 +08:00
世界 2dbb8c55c9 Add override destination to route options 2025-01-13 15:14:30 +08:00
世界 dc82247c13 Add dns.cache_capacity 2025-01-13 15:14:30 +08:00
世界 effcf39469 Add dns.cache_capacity 2025-01-13 15:14:30 +08:00
世界 dbffc1982e Refactor multi networks strategy 2025-01-13 15:14:30 +08:00
世界 9db9484863 Refactor multi networks strategy 2025-01-13 15:14:30 +08:00
世界 7861e43995 documentation: Remove unused titles 2025-01-13 15:14:30 +08:00
世界 ca813f461b documentation: Remove unused titles 2025-01-13 15:14:30 +08:00
世界 3eee2a4c04 Add multi network dialing 2025-01-13 15:14:30 +08:00
世界 bb46cdb2b3 Add multi network dialing 2025-01-13 15:14:30 +08:00
世界 8980214050 documentation: Merge route options to route actions 2025-01-13 15:14:29 +08:00
世界 dcb10c21a1 documentation: Merge route options to route actions 2025-01-13 15:14:29 +08:00
世界 1a687a6d63 Add network_[type/is_expensive/is_constrained] rule items 2025-01-13 15:14:29 +08:00
世界 05ea0ca00e Add network_[type/is_expensive/is_constrained] rule items 2025-01-13 15:14:29 +08:00
世界 fbfefedd1f Merge route options to route actions 2025-01-13 15:14:29 +08:00
世界 c098f282b1 Merge route options to route actions 2025-01-13 15:14:29 +08:00
世界 02dd8fe927 refactor: Platform Interfaces 2025-01-13 15:14:29 +08:00
世界 ecf82d197c refactor: Platform Interfaces 2025-01-13 15:14:29 +08:00
世界 25d261df35 refactor: Extract services form router 2025-01-13 15:14:29 +08:00
世界 9afe75586a refactor: Extract services form router 2025-01-13 15:14:29 +08:00
世界 c493cc521f refactor: Modular network manager 2025-01-13 15:14:29 +08:00
世界 a1be455202 refactor: Modular network manager 2025-01-13 15:14:29 +08:00
世界 cc924c1a60 refactor: Modular inbound/outbound manager 2025-01-13 15:14:29 +08:00
世界 19fb214226 refactor: Modular inbound/outbound manager 2025-01-13 15:14:29 +08:00
世界 9d524aa6a1 documentation: Add rule action 2025-01-13 15:14:29 +08:00
世界 28ec898a8c documentation: Add rule action 2025-01-13 15:14:29 +08:00
世界 3e29566610 documentation: Update the scheduled removal time of deprecated features 2025-01-13 15:14:29 +08:00
世界 467b1bbeeb documentation: Update the scheduled removal time of deprecated features 2025-01-13 15:14:29 +08:00
世界 31e8545d00 documentation: Remove outdated icons 2025-01-13 15:14:29 +08:00
世界 02ab8ce806 documentation: Remove outdated icons 2025-01-13 15:14:29 +08:00
世界 078de6c0fe Migrate bad options to library 2025-01-13 15:14:29 +08:00
世界 ce69e620e9 Migrate bad options to library 2025-01-13 15:14:29 +08:00
世界 d0020aa219 Implement udp connect 2025-01-13 15:14:29 +08:00
世界 1133cf3ef5 Implement udp connect 2025-01-13 15:14:29 +08:00
世界 e9e99cd7bd Implement new deprecated warnings 2025-01-13 15:14:29 +08:00
世界 59a607e303 Implement new deprecated warnings 2025-01-13 15:14:29 +08:00
世界 ecb69d41bc Improve rule actions 2025-01-13 15:14:29 +08:00
世界 313be3d7a4 Improve rule actions 2025-01-13 15:14:29 +08:00
世界 0c993f6f0c Remove unused reject methods 2025-01-13 15:14:29 +08:00
世界 4fe40fcee0 Remove unused reject methods 2025-01-13 15:14:29 +08:00
世界 8513463170 refactor: Modular inbounds/outbounds 2025-01-13 15:14:29 +08:00
世界 e233fd4fe5 refactor: Modular inbounds/outbounds 2025-01-13 15:14:29 +08:00
世界 725080267d Implement dns-hijack 2025-01-13 15:14:29 +08:00
世界 9f7683818f Implement dns-hijack 2025-01-13 15:14:29 +08:00
世界 2eeb79f064 Implement resolve(server) 2025-01-13 15:14:29 +08:00
世界 179e3cb2f5 Implement resolve(server) 2025-01-13 15:14:29 +08:00
世界 4eeeb9a78a Implement TCP and ICMP rejects 2025-01-13 15:14:29 +08:00
世界 41b960552d Implement TCP and ICMP rejects 2025-01-13 15:14:29 +08:00
世界 1a91743254 Crazy sekai overturns the small pond 2025-01-13 15:14:29 +08:00
世界 8304295c48 Crazy sekai overturns the small pond 2025-01-13 15:14:29 +08:00
世界 cd566cb2d5 Bump version 2025-01-11 20:58:00 +08:00
世界 253b41936e Bump version 2025-01-11 20:58:00 +08:00
世界 43c826a485 auto-redirect: Fix fetch interfaces 2025-01-07 21:24:52 +08:00
世界 ce5b4b06b5 auto-redirect: Fix fetch interfaces 2025-01-07 21:24:52 +08:00
世界 2668c7ca96 Fix leak in reality server 2025-01-07 17:27:10 +08:00
世界 50f5006c43 Fix leak in reality server 2025-01-07 17:27:10 +08:00
世界 4c181a7d8f quic: Fix source not unwrapped 2025-01-07 17:27:10 +08:00
世界 e42ff22c2e quic: Fix source not unwrapped 2025-01-07 17:27:10 +08:00
世界 4b303786e0 Bump version 2025-01-02 15:21:13 +08:00
世界 578571b972 Bump version 2025-01-02 15:21:13 +08:00
世界 10f4309028 Fix check interface 2025-01-01 12:19:56 +08:00
世界 935beca45d Fix check interface 2025-01-01 12:19:56 +08:00
世界 4de51d492f Fix vmess mux leak 2025-01-01 12:18:56 +08:00
世界 3e246f1173 Fix vmess mux leak 2025-01-01 12:18:56 +08:00
世界 4c6348aae0 Fix linter configuration 2025-01-01 12:18:56 +08:00
世界 1bc27a32c2 Fix linter configuration 2025-01-01 12:18:56 +08:00
世界 5b79a3c932 Enable fix stack for Android 7 and 9 2024-12-28 15:06:57 +08:00
世界 bc2e3960e4 Enable fix stack for Android 7 and 9 2024-12-28 15:06:57 +08:00
世界 6aed49f74c Bump version 2024-12-21 17:20:56 +08:00
世界 9c4ab0bf33 Bump version 2024-12-21 17:20:56 +08:00
世界 1d501df44a release: Fix create app store version 2024-12-21 17:20:56 +08:00
世界 27bdef34c7 release: Fix create app store version 2024-12-21 17:20:56 +08:00
世界 30310741bc Fix process rule check 2024-12-21 17:15:41 +08:00
世界 3c00099ed4 Fix process rule check 2024-12-21 17:15:41 +08:00
世界 7263c21d2f Fix wireguard 2024-12-21 16:07:19 +08:00
世界 2babf07f9a Fix wireguard 2024-12-21 16:07:19 +08:00
世界 93eaa3e8d6 release: Fix android version 2024-12-21 16:07:19 +08:00
世界 4795ed712b release: Fix android version 2024-12-21 16:07:19 +08:00
世界 a28af98856 release: Fix check tag 2024-12-21 16:07:19 +08:00
世界 d4cd564dbe release: Fix check tag 2024-12-21 16:07:19 +08:00
世界 d47b763c4f Bump version 2024-12-17 13:43:17 +08:00
世界 1676e13d3e Bump version 2024-12-17 13:43:17 +08:00
世界 3d995cee1e release: Add publish testflight 2024-12-17 13:43:17 +08:00
世界 50576084c6 release: Add publish testflight 2024-12-17 13:43:17 +08:00
世界 410ac75f46 documentation: Fix uid range example 2024-12-15 13:56:25 +08:00
世界 3a94e792a2 documentation: Fix uid range example 2024-12-15 13:56:25 +08:00
世界 9ea0ddc606 Update http file server usage 2024-12-15 13:56:25 +08:00
世界 9f69f41f68 Update http file server usage 2024-12-15 13:56:25 +08:00
世界 3ea6560d6a Add locale support ford deprecated messages 2024-12-15 02:57:08 +08:00
世界 e6847ff50e Add locale support ford deprecated messages 2024-12-15 02:57:08 +08:00
世界 d824b4d0c0 release: Fix publish testflight 2024-12-15 02:57:08 +08:00
世界 2ac2589d14 release: Fix publish testflight 2024-12-15 02:57:08 +08:00
世界 4242bb39a3 release: Fix UpdateBuildForAppStoreVersion 2024-12-14 20:18:36 +08:00
世界 64a94e8144 release: Fix UpdateBuildForAppStoreVersion 2024-12-14 20:18:36 +08:00
世界 eb1080139f wireguard: Fix windows tun read 2024-12-14 20:18:36 +08:00
世界 3ed8a5c5d1 wireguard: Fix windows tun read 2024-12-14 20:18:36 +08:00
世界 9ef06077f3 release: Fix Xcode version 2024-12-14 20:18:36 +08:00
世界 0a922c6fe3 release: Fix Xcode version 2024-12-14 20:18:36 +08:00
世界 d5d797ace1 release: Add app store connect actions 2024-12-14 20:18:36 +08:00
世界 52f3a4226c release: Add app store connect actions 2024-12-14 20:18:36 +08:00
世界 5c6d38308a release: Fix check prerelease 2024-12-14 20:18:36 +08:00
世界 483d9fa503 release: Fix check prerelease 2024-12-14 20:18:36 +08:00
世界 2168c5e5a8 release: Update macOS project version atomically 2024-12-14 20:18:36 +08:00
世界 dd9de694f8 release: Update macOS project version atomically 2024-12-14 20:18:36 +08:00
世界 13a9113f01 release: Fix play release 2024-12-14 20:18:36 +08:00
世界 5cdf5c1d9e release: Fix play release 2024-12-14 20:18:36 +08:00
世界 2e325fa663 Add workaround for bulkBarrierPreWrite: unaligned arguments panic 2024-12-14 20:18:36 +08:00
世界 cec7e47086 Add workaround for bulkBarrierPreWrite: unaligned arguments panic 2024-12-14 20:18:36 +08:00
世界 0c08ed087c release: Update debug iOS library build 2024-12-12 14:51:47 +08:00
世界 1e6a3f1f0b release: Update debug iOS library build 2024-12-12 14:51:47 +08:00
世界 a11949b743 Add workaround for golang/go#68760 2024-12-10 10:30:42 +08:00
世界 f0b6818b4c Add workaround for golang/go#68760 2024-12-10 10:30:42 +08:00
世界 ec66c58bd4 release: Add workflow build 2024-12-10 09:25:11 +08:00
世界 3032317918 release: Add workflow build 2024-12-10 09:25:11 +08:00
世界 3e1ffd87f7 Update NDK to r28-rc1 2024-12-09 15:11:38 +08:00
世界 db22f61846 Update NDK to r28-rc1 2024-12-09 15:11:38 +08:00
世界 95f2093abf wireguard: Fix set reserved 2024-12-05 17:58:09 +08:00
世界 8c3a98faa2 wireguard: Fix set reserved 2024-12-05 17:58:09 +08:00
世界 40a7e6da9f Fix initial traffic value 2024-12-03 21:43:56 +08:00
世界 1e787cb607 Fix initial traffic value 2024-12-03 21:43:56 +08:00
世界 8dfa69971b release: Set upload threads to 5 2024-12-03 17:36:19 +08:00
世界 558585b01d release: Set upload threads to 5 2024-12-03 17:36:19 +08:00
世界 7d2e434a55 Fix wireguard listen 2024-11-30 12:20:48 +08:00
世界 6e7ecbd4f5 Fix wireguard listen 2024-11-30 12:20:48 +08:00
世界 207d7a8d1b clashapi: Remove traffic loop 2024-11-28 12:57:56 +08:00
世界 5a661cde67 clashapi: Remove traffic loop 2024-11-28 12:57:56 +08:00
世界 fe9289aac2 Bump version 2024-11-27 10:45:24 +08:00
世界 3cc0e87cfb Bump version 2024-11-27 10:45:24 +08:00
世界 def8ae47e7 Update quic-go to v0.48.2 2024-11-27 10:37:00 +08:00
世界 effea5a2b3 Update quic-go to v0.48.2 2024-11-27 10:37:00 +08:00
世界 15a833d125 release: Clean before iOS build 2024-11-27 10:35:20 +08:00
世界 7f168c5ec6 release: Clean before iOS build 2024-11-27 10:35:20 +08:00
Zephyrusoand世界 6994c4d9a9 clashapi: Add mode list 2024-11-27 10:34:47 +08:00
Zephyrusoand世界 0e9129ee3f clashapi: Add mode list 2024-11-27 10:34:47 +08:00
世界 5e6330c251 Fix test tags 2024-11-23 12:20:12 +08:00
世界 1086d5e665 Fix test tags 2024-11-23 12:20:12 +08:00
世界 b2b9773be8 Fix build on bsd systems 2024-11-23 12:16:46 +08:00
世界 d9102ba599 Fix build on bsd systems 2024-11-23 12:16:46 +08:00
世界 4d144f3402 Bump version 2024-11-20 12:03:42 +08:00
世界 17019f1729 Bump version 2024-11-20 12:03:42 +08:00
世界 9acff8353b Fix start watcher 2024-11-20 11:32:53 +08:00
世界 6be07ed51f Fix start watcher 2024-11-20 11:32:53 +08:00
世界 9b827aaf40 Fix debug listener 2024-11-20 11:32:53 +08:00
世界 af58e3bec0 Fix debug listener 2024-11-20 11:32:53 +08:00
世界 2c1d1fa06d Fix "Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path" 2024-11-18 19:03:24 +08:00
世界 e58b549d0f Fix "Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path" 2024-11-18 19:03:24 +08:00
zeetexand世界 c1782c4550 Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path 2024-11-18 14:09:54 +08:00
zeetexand世界 1d81996ceb Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path 2024-11-18 14:09:54 +08:00
世界 0489b2b12b Update dependencies 2024-11-18 14:07:00 +08:00
世界 97c47e72c4 Update dependencies 2024-11-18 14:07:00 +08:00
世界 a64696d3f5 release: Notarize macos standalone manually with --no-s3-acceleration 2024-11-18 14:07:00 +08:00
世界 122be275b0 release: Notarize macos standalone manually with --no-s3-acceleration 2024-11-18 14:07:00 +08:00
世界 b02293f2b7 selector: Fix crash before start 2024-11-18 14:07:00 +08:00
世界 0bb1132034 selector: Fix crash before start 2024-11-18 14:07:00 +08:00
世界 13fdff655f Fix deprecated check 2024-11-18 14:07:00 +08:00
世界 de14337b4b Fix deprecated check 2024-11-18 14:07:00 +08:00
世界 f978632b0a Downgrade NDK to 26.2.11394342 2024-11-18 13:10:06 +08:00
世界 1e07633914 Downgrade NDK to 26.2.11394342 2024-11-18 13:10:06 +08:00
世界 8b1bb90ded Fix decompile rule-set 2024-11-18 13:10:06 +08:00
世界 e3e203844e Fix decompile rule-set 2024-11-18 13:10:06 +08:00
世界 a5a47644de Fix mux stream accept 2024-11-09 12:26:49 +08:00
世界 84a102a6ef Fix mux stream accept 2024-11-09 12:26:49 +08:00
世界 2003922509 Fix deprecated version check 2024-11-08 20:31:29 +08:00
世界 f1c76c4dde Fix deprecated version check 2024-11-08 20:31:29 +08:00
世界 74745c7995 Downgrade NDK to r26d 2024-11-07 19:58:53 +08:00
世界 8df0aa5719 Downgrade NDK to r26d 2024-11-07 19:58:53 +08:00
世界 6f783e4be4 Uniq deprecated notes 2024-11-07 19:58:53 +08:00
世界 21faadb992 Uniq deprecated notes 2024-11-07 19:58:53 +08:00
世界 9b43f6d957 platform: Add SendNotification 2024-11-06 12:53:32 +08:00
世界 88099a304a platform: Add SendNotification 2024-11-06 12:53:32 +08:00
世界 8a537a1938 Revert "platform: Add openURL event"
This reverts commit f78d470443.
2024-11-05 20:03:39 +08:00
世界 f504fb0d46 Revert "platform: Add openURL event"
This reverts commit 718cffea9a.
2024-11-05 20:03:39 +08:00
世界 d5ed823bc5 platform: Add link flags 2024-11-05 18:28:13 +08:00
世界 1d517b6ca5 platform: Add link flags 2024-11-05 18:28:13 +08:00
世界 5290b82e20 Update dependencies 2024-11-05 18:28:03 +08:00
世界 b702d0b67a Update dependencies 2024-11-05 18:28:03 +08:00
世界 d1d42e21fe platform: Remove SetTraceback("all") 2024-11-05 18:28:02 +08:00
世界 a001e30d8b platform: Remove SetTraceback("all") 2024-11-05 18:28:02 +08:00
世界 847df5d005 Fix "Fix metadata context" 2024-11-05 18:27:51 +08:00
世界 cdb93f0bb2 Fix "Fix metadata context" 2024-11-05 18:27:51 +08:00
世界 f78d470443 platform: Add openURL event 2024-11-05 18:27:51 +08:00
世界 718cffea9a platform: Add openURL event 2024-11-05 18:27:51 +08:00
世界 c0e9171d61 release: Add upload dSYMs 2024-10-30 15:35:20 +08:00
世界 9585c53e9f release: Add upload dSYMs 2024-10-30 15:35:20 +08:00
世界 687ca9b732 Add deprecated warnings 2024-10-30 14:01:28 +08:00
世界 d66d5cd457 Add deprecated warnings 2024-10-30 14:01:28 +08:00
世界 0e6f76981d Increase timeouts 2024-10-30 14:01:28 +08:00
世界 8c143feec8 Increase timeouts 2024-10-30 14:01:28 +08:00
世界 5ec09c7eb5 Update NDK version 2024-10-30 14:01:13 +08:00
世界 419058f466 Update NDK version 2024-10-30 14:01:13 +08:00
世界 bbe92562c6 Fix metadata context 2024-10-30 14:01:13 +08:00
世界 1a6047a61b Fix metadata context 2024-10-30 14:01:13 +08:00
世界 032201ae15 Rename HTTP start context 2024-10-30 14:01:13 +08:00
世界 327bb35ddd Rename HTTP start context 2024-10-30 14:01:13 +08:00
世界 a454ae6cc3 Fix rule-set format 2024-10-25 22:12:47 +08:00
世界 6ed9a06394 Fix rule-set format 2024-10-25 22:12:47 +08:00
世界 0f3bd657d9 Bump version 2024-10-16 21:11:31 +08:00
世界 b80ec55ba0 Bump version 2024-10-16 21:11:31 +08:00
世界 e468f58d27 Retry system forwarder listen 2024-10-16 20:47:26 +08:00
世界 08718112ae Retry system forwarder listen 2024-10-16 20:47:26 +08:00
976cc41a04 Fix corrected improper use of reader and bReader
Co-authored-by: x_123 <x@a>
2024-10-16 20:45:18 +08:00
956ee361df Fix corrected improper use of reader and bReader
Co-authored-by: x_123 <x@a>
2024-10-16 20:45:18 +08:00
世界 e308e8f690 documentation: Fix release notes 2024-10-16 20:45:13 +08:00
世界 e93d0408be documentation: Fix release notes 2024-10-16 20:45:13 +08:00
世界 6d1e1cce68 Bump version 2024-10-13 21:17:59 +08:00
世界 137832ff3e Bump version 2024-10-13 21:17:59 +08:00
世界 1ed7a65a13 documentation: Improve theme 2024-10-13 13:07:18 +08:00
世界 3ede29fb6d documentation: Improve theme 2024-10-13 13:07:18 +08:00
世界 c1cb25bcb1 build: Fix find NDK 2024-10-13 13:07:18 +08:00
世界 82ab68b542 build: Fix find NDK 2024-10-13 13:07:18 +08:00
renovate[bot]and世界 f0efa9b0ab [dependencies] Update actions/checkout digest to eef6144 2024-10-13 13:07:18 +08:00
renovate[bot]and世界 e55723d84d [dependencies] Update actions/checkout digest to eef6144 2024-10-13 13:07:18 +08:00
世界 fea3d62dc9 auto-redirect: Let fw4 take precedence over prerouting 2024-10-13 13:07:18 +08:00
世界 2f4d2d97f9 auto-redirect: Let fw4 take precedence over prerouting 2024-10-13 13:07:18 +08:00
世界 7db66b492f Update utls to v1.6.7 2024-10-13 13:07:02 +08:00
世界 926d6f769e Update utls to v1.6.7 2024-10-13 13:07:02 +08:00
srk24and世界 4dc07ac374 Add process_path_regex rule type 2024-10-13 13:07:02 +08:00
srk24and世界 846777cd0c Add process_path_regex rule type 2024-10-13 13:07:02 +08:00
世界 6336e7d51c clash-api: Add PNA support 2024-10-13 13:07:02 +08:00
世界 06533b7a3b clash-api: Add PNA support 2024-10-13 13:07:02 +08:00
世界 1479662a03 Add RDP sniffer 2024-10-13 13:07:02 +08:00
世界 4a95558c53 Add RDP sniffer 2024-10-13 13:07:02 +08:00
世界 2dc02a7658 Add SSH sniffer 2024-10-13 13:07:02 +08:00
世界 e39a28ed5a Add SSH sniffer 2024-10-13 13:07:02 +08:00
世界 65d0dc6f52 Write close error to log 2024-10-13 13:07:02 +08:00
世界 b2c708a3e6 Write close error to log 2024-10-13 13:07:02 +08:00
世界 c7f8c32a2c Add AdGuard DNS filter support 2024-10-13 13:07:02 +08:00
世界 a9209bb3e5 Add AdGuard DNS filter support 2024-10-13 13:07:02 +08:00
世界 1999415d2a Improve QUIC sniffer 2024-10-13 13:07:02 +08:00
世界 9dc3bb975a Improve QUIC sniffer 2024-10-13 13:07:02 +08:00
世界 b4e30313a1 Add inline rule-set & Add reload for local rule-set 2024-10-13 13:07:02 +08:00
世界 3a7acaa92a Add inline rule-set & Add reload for local rule-set 2024-10-13 13:07:02 +08:00
世界 ba9fffa170 Unique rule-set names 2024-10-13 13:07:02 +08:00
世界 6bebe2483b Unique rule-set names 2024-10-13 13:07:02 +08:00
世界 db564008db Add accept empty DNS rule option 2024-10-13 13:07:02 +08:00
世界 93cf134995 Add accept empty DNS rule option 2024-10-13 13:07:02 +08:00
世界 19ec24faaf Add custom options for TUN auto-route and auto-redirect 2024-10-13 13:07:02 +08:00
世界 ff7d8c9ba8 Add custom options for TUN auto-route and auto-redirect 2024-10-13 13:07:02 +08:00
世界 8c5d7d8ad7 Improve base DNS transports & Minor fixes 2024-10-13 13:07:02 +08:00
世界 50f07b42f6 Improve base DNS transports & Minor fixes 2024-10-13 13:07:02 +08:00
世界 a3b8d1b041 Add auto-redirect & Improve auto-route 2024-10-13 13:07:02 +08:00
世界 db3a0c636d Add auto-redirect & Improve auto-route 2024-10-13 13:07:02 +08:00
世界 625696c082 Add rule-set decompile command 2024-10-13 13:07:02 +08:00
世界 fec38f85cd Add rule-set decompile command 2024-10-13 13:07:02 +08:00
世界 28c8fa264f Add IP address support for rule-set match match 2024-10-13 13:07:02 +08:00
世界 dcb0141646 Add IP address support for rule-set match match 2024-10-13 13:07:02 +08:00
世界 682be19830 Improve usages of json.Unmarshal 2024-10-13 13:07:02 +08:00
世界 f4f5a3c925 Improve usages of json.Unmarshal 2024-10-13 13:07:02 +08:00
世界 849a320268 Bump rule-set version 2024-10-13 13:07:02 +08:00
世界 9b8d6c1b73 Bump rule-set version 2024-10-13 13:07:02 +08:00
世界 f463141abd Implement read deadline for QUIC based UDP inbounds 2024-10-13 13:07:02 +08:00
世界 2f776168de Implement read deadline for QUIC based UDP inbounds 2024-10-13 13:07:02 +08:00
世界 ad260da271 WTF is this 2024-10-13 13:07:01 +08:00
世界 923d3222b0 WTF is this 2024-10-13 13:07:01 +08:00
世界 bc04597fb1 platform: Fix clash server reload on android 2024-10-13 13:06:57 +08:00
世界 bda93d516b platform: Fix clash server reload on android 2024-10-13 13:06:57 +08:00
世界 b9748532a1 platform: Add log update interval 2024-10-13 13:06:57 +08:00
世界 7eec3fb57a platform: Add log update interval 2024-10-13 13:06:57 +08:00
世界 c073bd923e platform: Prepare connections list 2024-10-13 13:06:55 +08:00
世界 b1d75812c5 platform: Prepare connections list 2024-10-13 13:06:55 +08:00
世界 92ea482404 Drop support for go1.18 and go1.19 2024-10-07 04:58:48 +08:00
世界 d44e7d9834 Drop support for go1.18 and go1.19 2024-10-07 04:58:48 +08:00
世界 628c987c7d Add DTLS sniffer 2024-10-07 04:58:48 +08:00
世界 369bc7cea3 Add DTLS sniffer 2024-10-07 04:58:48 +08:00
iosmanthusand世界 a67be12ba8 Introduce bittorrent related protocol sniffers
* Introduce bittorrent related protocol sniffers

including, sniffers of
1. BitTorrent Protocol (TCP)
2. uTorrent Transport Protocol (UDP)

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Co-authored-by: 世界 <i@sekai.icu>
2024-10-07 04:58:48 +08:00
iosmanthusand世界 4b7a83da16 Introduce bittorrent related protocol sniffers
* Introduce bittorrent related protocol sniffers

including, sniffers of
1. BitTorrent Protocol (TCP)
2. uTorrent Transport Protocol (UDP)

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Co-authored-by: 世界 <i@sekai.icu>
2024-10-07 04:58:48 +08:00
世界 7bf3ceb7fb Update workflow to go1.23 2024-10-07 04:58:47 +08:00
世界 0f7154afbd Update workflow to go1.23 2024-10-07 04:58:47 +08:00
世界 642e39a52e Bump version 2024-10-07 04:34:48 +08:00
世界 a06d10c3bc Bump version 2024-10-07 04:34:48 +08:00
世界 5feaa93e89 Fix Makefile 2024-10-07 04:34:48 +08:00
世界 63cc6cc76c Fix Makefile 2024-10-07 04:34:48 +08:00
世界 f3f5156024 documentation: Update package status 2024-10-07 04:34:48 +08:00
世界 d55c5b5cab documentation: Update package status 2024-10-07 04:34:48 +08:00
世界 e55a721069 Fix context used by DNS outbounds 2024-10-07 04:34:48 +08:00
世界 b624c2dcc7 Fix context used by DNS outbounds 2024-10-07 04:34:48 +08:00
世界 ce5eec53cb Fix base path not applied to local rule-sets 2024-10-07 04:34:48 +08:00
世界 9415444ebd Fix base path not applied to local rule-sets 2024-10-07 04:34:48 +08:00
世界 e7433fe893 Add completions for linux packages 2024-10-07 04:34:48 +08:00
世界 95606191d8 Add completions for linux packages 2024-10-07 04:34:48 +08:00
世界 b7998466c2 Bump version 2024-09-20 23:37:06 +08:00
世界 e586d9e9bc Bump version 2024-09-20 23:37:06 +08:00
世界 4aa16a3805 Fix docker build 2024-09-20 23:37:06 +08:00
世界 8c7eaa4477 Fix docker build 2024-09-20 23:37:06 +08:00
世界 8a644139bb Fix version script 2024-09-20 21:10:15 +08:00
世界 8464c8cb7c Fix version script 2024-09-20 21:10:15 +08:00
世界 014fdd51f8 Revert "Fix stream sniffer" 2024-09-20 20:40:02 +08:00
世界 39d7127651 Revert "Fix stream sniffer" 2024-09-20 20:40:02 +08:00
世界 6dedc0dce4 documentation: Update client status 2024-09-20 20:13:55 +08:00
世界 e2077009c4 documentation: Update client status 2024-09-20 20:13:55 +08:00
世界 5b08a59229 Minor fixes 2024-09-20 20:13:14 +08:00
世界 700a8eb425 Minor fixes 2024-09-20 20:13:14 +08:00
世界 cbe590c9fc Fix wireguard start 2024-09-20 20:12:52 +08:00
世界 3b0cba0852 Fix wireguard start 2024-09-20 20:12:52 +08:00
世界 f80116a37a Bump version 2024-09-18 07:04:29 +08:00
世界 f5554dd8b8 Bump version 2024-09-18 07:04:29 +08:00
世界 f06799e09b Update macOS build workflow 2024-09-17 22:01:05 +08:00
世界 4d0362d530 Update macOS build workflow 2024-09-17 22:01:05 +08:00
世界 d968808db3 documentation: Add sponsors page 2024-09-17 18:47:33 +08:00
世界 97ccd2ca04 documentation: Add sponsors page 2024-09-17 18:47:33 +08:00
世界 bfe014d102 Add mips64 build 2024-09-15 12:12:25 +08:00
世界 1ed6654ad4 Add mips64 build 2024-09-15 12:12:25 +08:00
世界 fa8bf5082f documentation: Update build requirements 2024-09-15 12:10:00 +08:00
世界 5385f75f53 documentation: Update build requirements 2024-09-15 12:10:00 +08:00
世界 a4620c048a Fix disconnected interface selected as default in windows 2024-09-15 11:59:32 +08:00
世界 ad97d4e11f Fix disconnected interface selected as default in windows 2024-09-15 11:59:32 +08:00
世界 926c65333f Fix cached conn eats up read deadlines 2024-09-15 11:56:04 +08:00
世界 09d4e91b77 Fix cached conn eats up read deadlines 2024-09-15 11:56:04 +08:00
Monicaand世界 60104eaf7a documentation: Fix dial.zh.md
The Chinese documentation incorrectly stated that the default value for the domain_strategy field in the direct outbound module is dns.strategy. The correct value should be inbound.domain_strategy, as specified in the English documentation. This commit corrects the Chinese documentation to align with the accurate behavior described in the English version.

Signed-off-by: Monica <1379531829@qq.com>
2024-09-15 11:53:03 +08:00
Monicaand世界 3dbdda9555 documentation: Fix dial.zh.md
The Chinese documentation incorrectly stated that the default value for the domain_strategy field in the direct outbound module is dns.strategy. The correct value should be inbound.domain_strategy, as specified in the English documentation. This commit corrects the Chinese documentation to align with the accurate behavior described in the English version.

Signed-off-by: Monica <1379531829@qq.com>
2024-09-15 11:53:03 +08:00
世界 42854a26d5 documentation: Update client status 2024-09-13 10:09:08 +08:00
世界 1f4ed6ff8f documentation: Update client status 2024-09-13 10:09:08 +08:00
世界 5cf477af6f platform: Update bundle id 2024-09-12 17:55:53 +08:00
世界 6ddbe19bc0 platform: Update bundle id 2024-09-12 17:55:53 +08:00
世界 3c17e69101 Fix Makefile 2024-09-12 17:55:53 +08:00
世界 d7205ecc60 Fix Makefile 2024-09-12 17:55:53 +08:00
世界 c7fd8c66bb gomobile: Fix go mod version 2024-09-10 23:05:13 +08:00
世界 9e243e0ff9 gomobile: Fix go mod version 2024-09-10 23:05:13 +08:00
世界 665e4fd0db Update quic-go to v0.47.0 2024-09-09 14:45:46 +08:00
世界 02bc3e0a0a Update quic-go to v0.47.0 2024-09-09 14:45:46 +08:00
世界 41d927b3b1 Update README 2024-09-09 08:48:35 +08:00
世界 87be6dc235 Update README 2024-09-09 08:48:35 +08:00
世界 9dec4c80c0 Improve docker workflow 2024-09-08 11:11:47 +08:00
世界 c1c30976dc Improve docker workflow 2024-09-08 11:11:47 +08:00
世界 2846ff6fac wireguard: Fix events chan leak 2024-09-08 10:07:12 +08:00
世界 9bac18bcd1 wireguard: Fix events chan leak 2024-09-08 10:07:12 +08:00
世界 45200ddefd clash-api: Fix bad redirect 2024-09-08 10:07:07 +08:00
世界 ceda5cc95d clash-api: Fix bad redirect 2024-09-08 10:07:07 +08:00
世界 24aa28752f Fix stream sniffer 2024-09-08 10:07:07 +08:00
世界 27d6b63e71 Fix stream sniffer 2024-09-08 10:07:07 +08:00
世界 d6d2ddb02a tfo: Fix build with go1.23 2024-08-27 11:24:51 +08:00
世界 b57abcc73c tfo: Fix build with go1.23 2024-08-27 11:24:51 +08:00
世界 a54682d055 documentation: Fix missing zh headline 2024-08-21 18:52:38 +08:00
世界 f1147965dd documentation: Fix missing zh headline 2024-08-21 18:52:38 +08:00
世界 220d344218 documentation: Update package status 2024-08-21 11:39:07 +08:00
世界 45f3234c73 documentation: Update package status 2024-08-21 11:39:07 +08:00
Mingye Wangand世界 be03453d8b documentation: Two updates
* Copyedit documentation

Close #1378

* remove yum, go full on dnf

fixes #2049
2024-08-21 11:32:43 +08:00
Mingye Wangand世界 aae3fded32 documentation: Two updates
* Copyedit documentation

Close #1378

* remove yum, go full on dnf

fixes #2049
2024-08-21 11:32:43 +08:00
世界 289ac3f9d9 Do not close bug and enhancement issues 2024-08-21 08:09:15 +08:00
世界 090494faf5 Do not close bug and enhancement issues 2024-08-21 08:09:15 +08:00
世界 bd8629f046 Fix no error return when empty DNS cache retrieved 2024-08-20 23:23:48 +08:00
世界 db5719e22f Fix no error return when empty DNS cache retrieved 2024-08-20 23:23:48 +08:00
世界 68592914db Fix direct dialer not resolving domain 2024-08-20 21:02:52 +08:00
世界 064fb9b873 Fix direct dialer not resolving domain 2024-08-20 21:02:52 +08:00
世界 1ba8cc52ef Make linter happy 2024-08-19 18:42:02 +08:00
世界 f6a1e123fc Make linter happy 2024-08-19 18:42:02 +08:00
世界 524483c6aa Bump version 2024-08-19 10:43:09 +08:00
世界 3066dfe3b3 Bump version 2024-08-19 10:43:09 +08:00
Liu Bingyanand世界 9f0790379e documentation: Update injectable description 2024-08-19 07:40:31 +08:00
Liu Bingyanand世界 1128fdd8c7 documentation: Update injectable description 2024-08-19 07:40:31 +08:00
世界 9fa49abf6d documentation: Remove unused 2024-08-19 06:39:33 +08:00
世界 cfd9879b17 documentation: Remove unused 2024-08-19 06:39:33 +08:00
世界 7c2b4e75b5 documentation: Announce that our apps on Apple platforms are no longer available 2024-08-19 06:39:33 +08:00
世界 9ceb660c57 documentation: Announce that our apps on Apple platforms are no longer available 2024-08-19 06:39:33 +08:00
世界 f7dd206a02 Update quic-go to v0.46.0 2024-08-19 06:25:15 +08:00
世界 7d00d7df28 Update quic-go to v0.46.0 2024-08-19 06:25:15 +08:00
世界 c8d8c56f87 Fix UDP conn stuck on sniff
This change only avoids permanent hangs. We need to implement read deadlines for UDP conns in 1.10 for server inbounds.
2024-08-18 11:27:12 +08:00
世界 21b1ac26b9 Fix UDP conn stuck on sniff
This change only avoids permanent hangs. We need to implement read deadlines for UDP conns in 1.10 for server inbounds.
2024-08-18 11:27:12 +08:00
世界 34a0281915 Update golangci-lint configuration 2024-08-18 11:17:01 +08:00
世界 7fec8d842e Update golangci-lint configuration 2024-08-18 11:17:01 +08:00
世界 4fb8fc8287 Fix crash on Android when using process rules 2024-08-18 10:23:28 +08:00
世界 07c678fb85 Fix crash on Android when using process rules 2024-08-18 10:23:28 +08:00
世界 0a31a6fc2a Update quic-go to v0.45.2 2024-08-18 10:23:17 +08:00
世界 baecfc7778 Update quic-go to v0.45.2 2024-08-18 10:23:17 +08:00
世界 3a8f95606e Fix tests 2024-08-03 12:46:38 +08:00
世界 07de36ecdb Fix tests 2024-08-03 12:46:38 +08:00
世界 2ef36d577c dns: Minor fixes 2024-07-27 11:04:57 +08:00
世界 2c8a8303cd dns: Minor fixes 2024-07-27 11:04:57 +08:00
ruokeqxand世界 e72a109c4d Use unix.SysctlRaw for macOS 2024-07-22 12:42:22 +08:00
ruokeqxand世界 e5991cae0b Use unix.SysctlRaw for macOS 2024-07-22 12:42:22 +08:00
世界 9be074ee58 Fix panic caused by possible generation of duplicate keys for domain_suffix 2024-07-17 16:02:17 +08:00
世界 1349acfd5a Fix panic caused by possible generation of duplicate keys for domain_suffix 2024-07-17 16:02:17 +08:00
世界 ce1ad1498b Fix reset outbounds 2024-07-13 17:46:22 +08:00
世界 98ff897f35 Fix reset outbounds 2024-07-13 17:46:22 +08:00
ayoohandGitHub 16055b1a9a Fix default end value of the rangeItem 2024-07-13 17:45:32 +08:00
ayoohandGitHub 6144c8e340 Fix default end value of the rangeItem 2024-07-13 17:45:32 +08:00
HystericalDragonandGitHub c5091d2c4a Fix v2rayquic default NextProtos (#1934) 2024-07-11 23:34:09 +08:00
HystericalDragonandGitHub c8caac9f67 Fix v2rayquic default NextProtos (#1934) 2024-07-11 23:34:09 +08:00
printferand世界 c27da9e91b documentation: Fix typo 2024-07-07 16:09:41 +08:00
printferand世界 81e9eda357 documentation: Fix typo 2024-07-07 16:09:41 +08:00
世界 430fa490e2 shadowsocks: Fix packet process for AEAD multi-user server 2024-07-05 17:09:09 +08:00
世界 7cba3da108 shadowsocks: Fix packet process for AEAD multi-user server 2024-07-05 17:09:09 +08:00
世界 75609e23a5 vless: Fix missing deadline interfaces 2024-07-05 17:08:10 +08:00
世界 82d06b43e7 vless: Fix missing deadline interfaces 2024-07-05 17:08:10 +08:00
世界 a8c28eff35 Move legacy vless implemetation to library 2024-07-03 20:17:32 +08:00
世界 a7ac91f573 Move legacy vless implemetation to library 2024-07-03 20:17:32 +08:00
世界 9c82098284 Fix v2ray-plugin 2024-07-02 14:08:17 +08:00
世界 0540a95a43 Fix v2ray-plugin 2024-07-02 14:08:17 +08:00
世界 2f3ce4b534 Add name to errors from v2ray HTTP transports 2024-07-02 14:08:17 +08:00
世界 94707dfcdd Add name to errors from v2ray HTTP transports 2024-07-02 14:08:17 +08:00
世界 3bcf793ef9 Fix command output for rule-set match 2024-06-26 12:26:35 +08:00
世界 8a17043502 Fix command output for rule-set match 2024-06-26 12:26:35 +08:00
世界 9b2b63dbd3 Minor fixes 2024-06-25 13:14:45 +08:00
世界 b0aaa86806 Minor fixes 2024-06-25 13:14:45 +08:00
世界 bd5473d88d Update quic-go to v0.45.1 & Filter HTTPS ipv4/6hint 2024-06-24 11:07:32 +08:00
世界 8a2d3fbb28 Update quic-go to v0.45.1 & Filter HTTPS ipv4/6hint 2024-06-24 11:07:32 +08:00
renovate[bot]and世界 ed19c93c0d [dependencies] Update docker/build-push-action action to v6 2024-06-24 10:24:13 +08:00
renovate[bot]and世界 4652019608 [dependencies] Update docker/build-push-action action to v6 2024-06-24 10:24:13 +08:00
世界 275c8fa470 Fix non-IP queries accepted by address filter rules 2024-06-24 10:13:16 +08:00
世界 06fa5abf63 Fix non-IP queries accepted by address filter rules 2024-06-24 10:13:16 +08:00
世界 297cc5aa29 docs: Switch to venv 2024-06-24 10:10:49 +08:00
世界 996fbbf0c3 docs: Switch to venv 2024-06-24 10:10:49 +08:00
renovate[bot]and世界 0afadd7623 [dependencies] Update actions/checkout digest to 692973e 2024-06-17 13:05:54 +08:00
renovate[bot]and世界 142ff1b455 [dependencies] Update actions/checkout digest to 692973e 2024-06-17 13:05:54 +08:00
世界 48328c153f Fix always create package manager 2024-06-11 21:16:57 +08:00
世界 74d662f7a3 Fix always create package manager 2024-06-11 21:16:57 +08:00
世界 853ff1afc7 Bump version 2024-06-09 13:20:56 +08:00
世界 085f603377 Bump version 2024-06-09 13:20:56 +08:00
世界 af86dac1b0 Fix quic-go is caching dialErr since v0.43.0 2024-06-09 13:15:40 +08:00
世界 460fae83dc Fix quic-go is caching dialErr since v0.43.0 2024-06-09 13:15:40 +08:00
世界 0a338e3d35 Fix package manager start order 2024-06-09 07:21:50 +08:00
世界 bb9bd9bff6 Fix package manager start order 2024-06-09 07:21:50 +08:00
世界 6d26a08d6e Bump version 2024-06-08 22:00:46 +08:00
世界 c2354ebf25 Bump version 2024-06-08 22:00:46 +08:00
世界 5469848246 Fix parse UDP DNS server with addr:port address 2024-06-08 22:00:46 +08:00
世界 c1f4755c4e Fix parse UDP DNS server with addr:port address 2024-06-08 22:00:46 +08:00
世界 3b756db94b Stop passing device sleep events on Android and Apple platforms 2024-06-08 22:00:46 +08:00
世界 0ca5909b06 Stop passing device sleep events on Android and Apple platforms 2024-06-08 22:00:46 +08:00
世界 6a84618160 Fix rule-set start order 2024-06-08 22:00:46 +08:00
世界 e77a8114c5 Fix rule-set start order 2024-06-08 22:00:46 +08:00
renovate[bot]and世界 121928e849 [dependencies] Update actions/checkout digest to a5ac7e5 2024-06-08 22:00:46 +08:00
renovate[bot]and世界 f1393235ff [dependencies] Update actions/checkout digest to a5ac7e5 2024-06-08 22:00:46 +08:00
renovate[bot]and世界 123947a2ad [dependencies] Update goreleaser/goreleaser-action action to v6 2024-06-08 18:58:22 +08:00
renovate[bot]and世界 bdba2365de [dependencies] Update goreleaser/goreleaser-action action to v6 2024-06-08 18:58:22 +08:00
世界 1b169b0d1d Fix typo 2024-06-08 18:58:14 +08:00
世界 ce0da5b557 Fix typo 2024-06-08 18:58:14 +08:00
世界 6c44bad0fd Bump version 2024-06-07 19:07:46 +08:00
世界 3853201412 Bump version 2024-06-07 19:07:46 +08:00
世界 94e89f1568 Fix wireguard start 2024-06-07 19:07:46 +08:00
世界 7003ef40a3 Fix wireguard start 2024-06-07 19:07:46 +08:00
世界 bb20856a6c Fix repeatedly no route logs 2024-06-07 15:03:48 +08:00
世界 59ec92228c Fix repeatedly no route logs 2024-06-07 15:03:48 +08:00
世界 5f20d6371b Fix reset HTTP3 DNS transport 2024-06-06 22:28:43 +08:00
世界 0eeb2da323 Fix reset HTTP3 DNS transport 2024-06-06 22:28:43 +08:00
世界 41d5fe8c1a Fix get source address from X-Forwarded-For 2024-06-06 22:21:37 +08:00
世界 977b0fac02 Fix get source address from X-Forwarded-For 2024-06-06 22:21:37 +08:00
世界 d199f20f25 Fix enforced power listener on windows 2024-06-06 22:20:23 +08:00
世界 51964801ff Fix enforced power listener on windows 2024-06-06 22:20:23 +08:00
世界 e694262025 Fix wireguard client bind 2024-06-06 22:20:21 +08:00
世界 e08c052fc9 Fix wireguard client bind 2024-06-06 22:20:21 +08:00
世界 cd758255df Remove logs in router initialize 2024-06-06 22:20:19 +08:00
世界 53927d8bbd Remove logs in router initialize 2024-06-06 22:20:19 +08:00
世界 2fb554c1ae Fix crash on *bsd 2024-06-06 22:20:17 +08:00
世界 968b9bc217 Fix crash on *bsd 2024-06-06 22:20:17 +08:00
lgjintand世界 ea713c7c34 Fix set KDE6 system proxy 2024-06-06 22:20:14 +08:00
lgjintand世界 69dc87aa6d Fix set KDE6 system proxy 2024-06-06 22:20:14 +08:00
Fei1Yangand世界 a5896c3215 build: Remove vendor in RPM packages 2024-05-27 19:28:15 +08:00
Fei1Yangand世界 4193df375f build: Remove vendor in RPM packages 2024-05-27 19:28:15 +08:00
世界 109c84760f Bump version 2024-05-25 11:30:43 +08:00
世界 5ff7006326 Bump version 2024-05-25 11:30:43 +08:00
世界 baa25731f3 documentation: Bump version 2024-05-23 14:57:45 +08:00
世界 a89107ea9d documentation: Bump version 2024-05-23 14:57:45 +08:00
世界 ad37345884 documentation: Add manuel for mitigating tunnelvision attacks 2024-05-23 14:57:27 +08:00
世界 9ffdbba2ed documentation: Add manuel for mitigating tunnelvision attacks 2024-05-23 14:57:27 +08:00
世界 07b24a0b2e documentation: Update DNS manual 2024-05-23 14:57:26 +08:00
世界 65c71049ea documentation: Update DNS manual 2024-05-23 14:57:26 +08:00
世界 98551b109b dialer: Allow nil router 2024-05-23 14:57:26 +08:00
世界 7d4e6a7f4e dialer: Allow nil router 2024-05-23 14:57:26 +08:00
世界 52827e9a90 Add rule-set match command 2024-05-23 14:57:26 +08:00
世界 d612620c5d Add rule-set match command 2024-05-23 14:57:26 +08:00
世界 15dc38335e Add bypass_domain and search_domain platform HTTP proxy options 2024-05-23 14:57:26 +08:00
世界 8a9a77a438 Add bypass_domain and search_domain platform HTTP proxy options 2024-05-23 14:57:26 +08:00
世界 482a5ebb9d Handle includeAllNetworks 2024-05-23 14:57:26 +08:00
世界 a2098c18e1 Handle includeAllNetworks 2024-05-23 14:57:26 +08:00
世界 3849e3a908 Update gVisor to 20240422.0 2024-05-23 14:57:15 +08:00
世界 cf2181dd3a Update gVisor to 20240422.0 2024-05-23 14:57:15 +08:00
世界 2d925511b6 Update quic-go to v0.43.1 2024-05-21 15:12:05 +08:00
世界 5899e95ff1 Update quic-go to v0.43.1 2024-05-21 15:12:05 +08:00
世界 0e15fbf6d1 Fixed order for Clash modes 2024-05-21 15:12:05 +08:00
世界 d7160c19cf Fixed order for Clash modes 2024-05-21 15:12:05 +08:00
世界 2be319ea85 Add custom prefix support in EDNS0 client subnet options 2024-05-21 15:12:05 +08:00
世界 da9e22b4e6 Add custom prefix support in EDNS0 client subnet options 2024-05-21 15:12:05 +08:00
气息and世界 f6b04590b4 Fix DNS exchange index
Signed-off-by: 气息 <qdshizh@gmail.com>
2024-05-21 15:12:05 +08:00
气息and世界 0e120f8a44 Fix DNS exchange index
Signed-off-by: 气息 <qdshizh@gmail.com>
2024-05-21 15:12:05 +08:00
dyhkwongand世界 f613f8cc39 Always disable cache for fake-ip servers 2024-05-21 15:12:04 +08:00
dyhkwongand世界 d918863ac5 Always disable cache for fake-ip servers 2024-05-21 15:12:04 +08:00
PuerNyaand世界 0dd345d168 Always disable cache for fake-ip DNS transport if independent_cache disabled 2024-05-21 15:12:03 +08:00
PuerNyaand世界 2ae192305c Always disable cache for fake-ip DNS transport if independent_cache disabled 2024-05-21 15:12:03 +08:00
世界 eb365da910 Fix missing rule_set_ipcidr_match_source item in DNS rules 2024-05-21 15:12:03 +08:00
世界 71d1879bd6 Fix missing rule_set_ipcidr_match_source item in DNS rules 2024-05-21 15:12:03 +08:00
世界 1d84ae9383 Improve DNS truncate behavior 2024-05-21 15:12:03 +08:00
世界 917514e09f Improve DNS truncate behavior 2024-05-21 15:12:03 +08:00
世界 85ca9718ad Fix DNS fallthrough incorrectly 2024-05-21 15:12:03 +08:00
世界 5327aeaea4 Fix DNS fallthrough incorrectly 2024-05-21 15:12:03 +08:00
世界 4634c14516 Add rejected DNS response cache support 2024-05-21 15:12:03 +08:00
世界 93ae3f7a1e Add rejected DNS response cache support 2024-05-21 15:12:03 +08:00
世界 ec7120b762 Add support for client-subnet DNS options 2024-05-21 15:12:03 +08:00
世界 f24a2aed7d Add support for client-subnet DNS options 2024-05-21 15:12:03 +08:00
世界 d9b020826a Add address filter support for DNS rules 2024-05-21 15:12:02 +08:00
世界 0517ceef76 Add address filter support for DNS rules 2024-05-21 15:12:02 +08:00
世界 c0e5315b68 Fix timezone for Android and iOS 2024-05-21 15:11:52 +08:00
世界 830ea46932 Fix timezone for Android and iOS 2024-05-21 15:11:52 +08:00
世界 108ccaab98 Improve loopback detector 2024-05-21 15:11:52 +08:00
世界 cd0fcd5ddc Improve loopback detector 2024-05-21 15:11:52 +08:00
世界 edd0677a4a Remove unused fakeip packet conn 2024-05-21 15:11:52 +08:00
世界 003176f069 Remove unused fakeip packet conn 2024-05-21 15:11:52 +08:00
世界 4253a87717 Set the default TCP keep alive period 2024-05-21 15:11:52 +08:00
世界 71d92518c1 Set the default TCP keep alive period 2024-05-21 15:11:52 +08:00
世界 045252ffbb Migrate ntp service to library 2024-05-21 15:11:52 +08:00
世界 b5dcd6bf59 Migrate ntp service to library 2024-05-21 15:11:52 +08:00
世界 f06ea8492f Handle Windows power events 2024-05-21 15:11:52 +08:00
世界 11c7b4a866 Handle Windows power events 2024-05-21 15:11:52 +08:00
世界 58d4110e32 Improve domain suffix match behavior
For historical reasons, sing-box's `domain_suffix` rule matches literal prefixes instead of the same as other projects.

This change modifies the behavior of `domain_suffix`: If the rule value is prefixed with `.`,
the behavior is unchanged, otherwise it matches `(domain|.+\.domain)` instead.
2024-05-21 15:11:41 +08:00
世界 ee14135298 Improve domain suffix match behavior
For historical reasons, sing-box's `domain_suffix` rule matches literal prefixes instead of the same as other projects.

This change modifies the behavior of `domain_suffix`: If the rule value is prefixed with `.`,
the behavior is unchanged, otherwise it matches `(domain|.+\.domain)` instead.
2024-05-21 15:11:41 +08:00
世界 ec4699fe0b Remove PROCESS_NAME_NATIVE dwFlag in process query output
The `process_path` rule of sing-box is inherited from Clash,
the original code uses the local system's path format (e.g. `\Device\HarddiskVolume1\folder\program.exe`),
but when the device has multiple disks, the HarddiskVolume serial number is not stable.

This change make QueryFullProcessImageNameW output a Win32 path (such as `C:\folder\program.exe`),
which will disrupt the existing `process_path` use cases in Windows.
2024-05-18 17:22:14 +08:00
世界 cbcf005f37 Remove PROCESS_NAME_NATIVE dwFlag in process query output
The `process_path` rule of sing-box is inherited from Clash,
the original code uses the local system's path format (e.g. `\Device\HarddiskVolume1\folder\program.exe`),
but when the device has multiple disks, the HarddiskVolume serial number is not stable.

This change make QueryFullProcessImageNameW output a Win32 path (such as `C:\folder\program.exe`),
which will disrupt the existing `process_path` use cases in Windows.
2024-05-18 17:22:14 +08:00
世界 6f340e62e7 badtls: Support uTLS and TLS ECH for read waiter 2024-05-18 17:22:14 +08:00
世界 daee0b154e badtls: Support uTLS and TLS ECH for read waiter 2024-05-18 17:22:14 +08:00
世界 526c3ea51e Bump version 2024-05-18 16:53:05 +08:00
世界 d530c724c0 Bump version 2024-05-18 16:53:05 +08:00
世界 4943979e71 Fix hysteria2 panic 2024-05-18 16:20:32 +08:00
世界 7f698c1104 Fix hysteria2 panic 2024-05-18 16:20:32 +08:00
renovate[bot]and世界 35d86c42e1 [dependencies] Update golangci/golangci-lint-action action to v6 2024-05-10 19:49:20 +08:00
renovate[bot]and世界 7a4a44c6d2 [dependencies] Update golangci/golangci-lint-action action to v6 2024-05-10 19:49:20 +08:00
世界 c95893733a Fix urltest logic 2024-05-10 17:41:20 +08:00
世界 44277e5dd2 Fix urltest logic 2024-05-10 17:41:20 +08:00
世界 838197c957 Update docker workflow 2024-05-03 19:33:20 +08:00
世界 1f470c69c4 Update docker workflow 2024-05-03 19:33:20 +08:00
世界 10df4bf8c0 Bump version 2024-05-03 17:38:26 +08:00
世界 742adacce7 Bump version 2024-05-03 17:38:26 +08:00
世界 5b6dd93859 documentation: Update package status 2024-05-03 17:38:26 +08:00
世界 32e1d5a5e2 documentation: Update package status 2024-05-03 17:38:26 +08:00
世界 5a61ddeb7f Minor fixes 2024-05-03 15:34:47 +08:00
世界 cb9f4ce597 Minor fixes 2024-05-03 15:34:47 +08:00
世界 be36e1795b Fix DNF repo 2024-04-29 23:13:04 +08:00
世界 4b1a6185ba Fix DNF repo 2024-04-29 23:13:04 +08:00
世界 b6081cff65 Fix multiplex client dialer context 2024-04-29 11:58:20 +08:00
世界 8d85c92356 Fix multiplex client dialer context 2024-04-29 11:58:20 +08:00
世界 a54a6b6161 Fix usage of github actions 2024-04-29 11:58:20 +08:00
世界 c6164c9eca Fix usage of github actions 2024-04-29 11:58:20 +08:00
dyhkwongand世界 142f476c83 Fix fake-ip mapping 2024-04-29 11:58:20 +08:00
dyhkwongand世界 3c85b8bc48 Fix fake-ip mapping 2024-04-29 11:58:20 +08:00
HystericalDragonand世界 6f845a3e0c Remove unused encoder 2024-04-29 11:58:20 +08:00
HystericalDragonand世界 8b8fb4344c Remove unused encoder 2024-04-29 11:58:20 +08:00
renovate[bot]and世界 1c13ae07f5 [dependencies] Update golangci/golangci-lint-action action to v5 2024-04-29 11:58:20 +08:00
renovate[bot]and世界 e85a38e059 [dependencies] Update golangci/golangci-lint-action action to v5 2024-04-29 11:58:20 +08:00
renovate[bot]and世界 97378806a1 [dependencies] Update actions/checkout digest to 0ad4b8f 2024-04-29 11:58:20 +08:00
renovate[bot]and世界 f3ac91673a [dependencies] Update actions/checkout digest to 0ad4b8f 2024-04-29 11:58:20 +08:00
世界 fb5a8d09d7 documentation: Update TestFlight 2024-04-29 11:58:20 +08:00
世界 0f1e58b917 documentation: Update TestFlight 2024-04-29 11:58:20 +08:00
世界 0a725e3982 documentation: Fix strict_route description 2024-04-29 11:58:20 +08:00
世界 c4cfe24aef documentation: Fix strict_route description 2024-04-29 11:58:20 +08:00
世界 a11648d70e Fix linux workflow 2024-04-29 11:58:20 +08:00
世界 3d73b159ba Fix linux workflow 2024-04-29 11:58:20 +08:00
世界 0f1d4a9264 Bump version 2024-04-23 14:14:40 +08:00
世界 0ae1afef44 Bump version 2024-04-23 14:14:40 +08:00
世界 b6644f5f03 Update dependencies 2024-04-23 14:03:55 +08:00
世界 a5e2a4073b Update dependencies 2024-04-23 14:03:55 +08:00
世界 4575b75391 Fix initial packet MTU for QUIC protocols 2024-04-23 11:12:31 +08:00
世界 b6cb3948a3 Fix initial packet MTU for QUIC protocols 2024-04-23 11:12:31 +08:00
世界 bf90099637 Fix loopback detector 2024-04-17 21:45:54 +08:00
世界 7b0f5061dc Fix loopback detector 2024-04-17 21:45:54 +08:00
世界 2c1e2e6454 Fix linux repo 2024-04-12 22:52:37 +08:00
世界 76f20482f7 Fix linux repo 2024-04-12 22:52:37 +08:00
世界 68bd2b55c4 Update dependencies 2024-04-12 22:52:37 +08:00
世界 e735a5bdc8 Update dependencies 2024-04-12 22:52:37 +08:00
世界 cfae1465d7 Bump version 2024-04-08 11:55:41 +08:00
世界 70381e93c8 Bump version 2024-04-08 11:55:41 +08:00
世界 d9a5fcf568 Update dependencies 2024-04-08 11:45:00 +08:00
世界 07a40716e8 Update dependencies 2024-04-08 11:45:00 +08:00
世界 b064aee4d1 Fix linux network monitor 2024-04-08 11:45:00 +08:00
世界 5fea5956db Fix linux network monitor 2024-04-08 11:45:00 +08:00
世界 2dcc6fff6d Fix timer usage 2024-04-08 11:45:00 +08:00
世界 d20a389043 Fix timer usage 2024-04-08 11:45:00 +08:00
世界 7e736818f0 Fixes for QUIC protocols 2024-04-08 11:44:55 +08:00
世界 4a4180bde5 Fixes for QUIC protocols 2024-04-08 11:44:55 +08:00
世界 1b150d4b43 Update dependencies 2024-03-29 04:52:06 +00:00
世界 7ecb6daabb Update dependencies 2024-03-29 04:52:06 +00:00
世界 8913ca7c1b Fix fury release 2024-03-25 10:44:57 +08:00
世界 712bdd9ae5 Fix fury release 2024-03-25 10:44:57 +08:00
世界 1284596ad9 Fix syscall packet read waiter 2024-03-25 01:49:59 +08:00
世界 a3b74591a7 Fix syscall packet read waiter 2024-03-25 01:49:59 +08:00
世界 412d5b5ac7 Fix canceler 2024-03-24 19:12:07 +08:00
世界 2f4abc6523 Fix canceler 2024-03-24 19:12:07 +08:00
dyhkwongandGitHub 4910fcd2e5 Fix source_ip_is_private matching 2024-03-24 19:06:02 +08:00
dyhkwongandGitHub 965ab075d9 Fix source_ip_is_private matching 2024-03-24 19:06:02 +08:00
世界 330d3eaf1c Bump version 2024-03-23 20:50:45 +08:00
世界 ed2f8b9637 Bump version 2024-03-23 20:50:45 +08:00
世界 94fce0ab8a tun: Fix GSO batch size 2024-03-22 14:54:57 +08:00
世界 0f71ce5120 tun: Fix GSO batch size 2024-03-22 14:54:57 +08:00
世界 4feba5c2dd Fix Makefile 2024-03-21 23:32:02 +08:00
世界 f8085ab111 Fix Makefile 2024-03-21 23:32:02 +08:00
世界 7eb6d528b5 Fix WireGuard client bind 2024-03-20 10:52:24 +08:00
世界 f61b272cbf Fix WireGuard client bind 2024-03-20 10:52:24 +08:00
世界 dc41a0f6e1 Use local legacy compiler 2024-03-19 13:53:34 +08:00
世界 59d437b9d2 Use local legacy compiler 2024-03-19 13:53:34 +08:00
世界 f42cc84258 Fix DNS panic 2024-03-19 12:17:32 +08:00
世界 a7338fdc2b Fix DNS panic 2024-03-19 12:17:32 +08:00
Puqns67and世界 5f75bc8c37 Fix the installation location of service files in prebuilded package 2024-03-19 12:13:59 +08:00
Puqns67and世界 d88860928e Fix the installation location of service files in prebuilded package 2024-03-19 12:13:59 +08:00
世界 2e22441a38 Fix build for F-Droid 2024-03-17 21:43:22 +08:00
世界 20a2e38f47 Fix build for F-Droid 2024-03-17 21:43:22 +08:00
世界 c643fa0e53 Fix fury workflow 2024-03-17 21:43:22 +08:00
世界 acd438be23 Fix fury workflow 2024-03-17 21:43:22 +08:00
世界 852dc00c49 Bump version 2024-03-16 12:05:58 +08:00
世界 e27fb51b54 Bump version 2024-03-16 12:05:58 +08:00
世界 3300a65a11 Fix Makefile 2024-03-15 18:06:37 +08:00
世界 adc38b26eb Fix Makefile 2024-03-15 18:06:37 +08:00
世界 f195a6d406 Fix darwin interface monitor 2024-03-15 18:06:37 +08:00
世界 7e943e743a Fix darwin interface monitor 2024-03-15 18:06:37 +08:00
世界 b6db44c5c8 platform: Improve stop on apple platforms 2024-03-15 18:06:37 +08:00
世界 ceffcc0ad2 platform: Improve stop on apple platforms 2024-03-15 18:06:37 +08:00
世界 2431d7818d platform: Fix missing log on apple platforms 2024-03-15 18:06:37 +08:00
世界 fdc451f7c6 platform: Fix missing log on apple platforms 2024-03-15 18:06:37 +08:00
世界 62824e0ab1 Add repo release 2024-03-15 18:06:37 +08:00
世界 b48c471e6a Add repo release 2024-03-15 18:06:37 +08:00
世界 6f4972d0b1 Fix lint workflow 2024-03-13 19:39:59 +08:00
世界 4b1fabd007 Fix lint workflow 2024-03-13 19:39:59 +08:00
世界 9527b786ea Add sponsor link to issue template 2024-03-13 19:39:59 +08:00
世界 2b5eb1c59e Add sponsor link to issue template 2024-03-13 19:39:59 +08:00
世界 d33ccb04ee platform: reset network on invalid power events 2024-03-13 19:39:59 +08:00
世界 e2d3862e64 platform: reset network on invalid power events 2024-03-13 19:39:59 +08:00
世界 2c0c202462 Fix crash in HTTP proxy server again 2024-03-10 16:53:58 +08:00
世界 4f5e7b974d Fix crash in HTTP proxy server again 2024-03-10 16:53:58 +08:00
世界 8368be4f16 Update dependencies 2024-03-08 23:36:33 +08:00
世界 21dedddd93 Update dependencies 2024-03-08 23:36:33 +08:00
世界 8a4c09e5fe Update go 1.20 2024-03-08 23:31:42 +08:00
世界 e02502bec0 Update go 1.20 2024-03-08 23:31:42 +08:00
世界 90eceea7d9 Fix missing source address in inbound logs in QUIC inbounds 2024-03-07 10:47:16 +08:00
世界 ba67633ee8 Fix missing source address in inbound logs in QUIC inbounds 2024-03-07 10:47:16 +08:00
世界 f0ab9311ff Bump version 2024-03-05 13:14:38 +08:00
世界 7fd9abe802 Bump version 2024-03-05 13:14:38 +08:00
世界 97969df4fb documentation: Add link to F-Droid 2024-03-05 13:13:31 +08:00
世界 78a5f59202 documentation: Add link to F-Droid 2024-03-05 13:13:31 +08:00
世界 ab6c947b40 Update dependencies 2024-03-02 14:29:28 +08:00
世界 8d0da685d2 Update dependencies 2024-03-02 14:29:28 +08:00
世界 618e8eb55a Fix crash in HTTP proxy server 2024-03-02 14:28:47 +08:00
世界 e6644f784e Fix crash in HTTP proxy server 2024-03-02 14:28:47 +08:00
世界 333bf1fe61 Fix SO_BINDTOIFINDEX usage 2024-02-29 13:03:05 +08:00
世界 2b93b74d38 Fix SO_BINDTOIFINDEX usage 2024-02-29 13:03:05 +08:00
世界 ca772c98ab Don't return error in WireGurad client bind 2024-02-28 15:28:38 +08:00
世界 dd52c26ae1 Don't return error in WireGurad client bind 2024-02-28 15:28:38 +08:00
世界 1da72e549b Bump version 2024-02-28 15:10:28 +08:00
世界 f288e3898b Bump version 2024-02-28 15:10:28 +08:00
世界 c9da823192 documentation: Update privacy policy to make Play Store happy 2024-02-28 15:10:28 +08:00
世界 1bc893a73a documentation: Update privacy policy to make Play Store happy 2024-02-28 15:10:28 +08:00
世界 e6017d0699 platform: Upgrade NDK to the latest LTS version 2024-02-28 15:10:28 +08:00
世界 7359fdf195 platform: Upgrade NDK to the latest LTS version 2024-02-28 15:10:28 +08:00
世界 292e75aa0c Update dependencies 2024-02-26 22:53:31 +08:00
世界 02b7041de6 Update dependencies 2024-02-26 22:53:31 +08:00
世界 8bafd46fa4 Fix network/interface monitor 2024-02-26 22:53:31 +08:00
世界 96ac931b11 Fix network/interface monitor 2024-02-26 22:53:31 +08:00
世界 6eed5c6c82 Fix reproducible builds 2024-02-24 23:19:31 +08:00
世界 3077a82650 Fix reproducible builds 2024-02-24 23:19:31 +08:00
世界 b181fbd182 Fix docker workflow 2024-02-24 22:49:07 +08:00
世界 de998c5119 Fix docker workflow 2024-02-24 22:49:07 +08:00
世界 961a2b0db7 documentation: Bump version 2024-02-24 13:20:43 +08:00
世界 d32c30c4b7 documentation: Bump version 2024-02-24 13:20:43 +08:00
世界 c1d9ff4ce1 Remove invalid archlinux packages from release 2024-02-24 13:20:43 +08:00
世界 4823023806 Remove invalid archlinux packages from release 2024-02-24 13:20:43 +08:00
Aleksandr Razumovand世界 2b87a8050d Add riscv64 to platform list in release 2024-02-24 13:20:43 +08:00
Aleksandr Razumovand世界 bb355d17b2 Add riscv64 to platform list in release 2024-02-24 13:20:43 +08:00
hiddifyand世界 e9b02dbd0e platform: Fix group update interval not taking effect 2024-02-24 13:20:43 +08:00
hiddifyand世界 aaf30bf92b platform: Fix group update interval not taking effect 2024-02-24 13:20:43 +08:00
hiddifyand世界 00b4112674 platform: Remove duplicated close 2024-02-24 13:20:43 +08:00
hiddifyand世界 f8c400cffc platform: Remove duplicated close 2024-02-24 13:20:43 +08:00
hatune-mikuand世界 82f70d19c1 documentation: Fix navigation menu 2024-02-24 13:20:42 +08:00
hatune-mikuand世界 3c24411e14 documentation: Fix navigation menu 2024-02-24 13:20:42 +08:00
世界 d97ea76af8 Fix HTTP inbound 2024-02-24 13:20:42 +08:00
世界 4a44aa3c21 Fix HTTP inbound 2024-02-24 13:20:42 +08:00
世界 bbe2cf6cb4 Fix documentation 2024-02-24 13:20:42 +08:00
世界 8db2ae0c83 Fix documentation 2024-02-24 13:20:42 +08:00
世界 d689f35902 platform: Unify client versions 2024-02-24 13:20:27 +08:00
世界 80d1aebcb7 platform: Unify client versions 2024-02-24 13:20:27 +08:00
世界 cff8cc1abe platform: Export NeedWIFIState for Android 2024-02-18 14:24:21 +08:00
世界 5583e01c99 platform: Export NeedWIFIState for Android 2024-02-18 14:24:21 +08:00
世界 bf49b1f435 Copy DNS message struct instead of deep copy 2024-02-10 23:49:09 +08:00
世界 bca0b86549 Copy DNS message struct instead of deep copy 2024-02-10 23:49:09 +08:00
世界 d9ce0a9960 Fix destination IP CIDR match in DNS 2024-02-10 22:37:42 +08:00
世界 8332878cdc Fix destination IP CIDR match in DNS 2024-02-10 22:37:42 +08:00
世界 dcfd80cc19 Fix TUN unaligned panic on windows 2024-02-10 21:22:02 +08:00
世界 d0ba69ad22 Fix TUN unaligned panic on windows 2024-02-10 21:22:02 +08:00
世界 42cce55115 documentation: Fix description for with_ech 2024-02-10 12:01:09 +08:00
世界 31b8834427 documentation: Fix description for with_ech 2024-02-10 12:01:09 +08:00
renovate[bot]and世界 dbfe719f2d [dependencies] Update golang Docker tag to v1.22 2024-02-10 11:54:40 +08:00
renovate[bot]and世界 d0f7a59e9b [dependencies] Update golang Docker tag to v1.22 2024-02-10 11:54:40 +08:00
renovate[bot]and世界 7d6aba5ea6 [dependencies] Update github-actions 2024-02-10 11:54:31 +08:00
renovate[bot]and世界 71e7d517a8 [dependencies] Update github-actions 2024-02-10 11:54:31 +08:00
世界 0beebdadad platform: Ignore momentary pause on iOS 2024-02-09 13:57:47 +08:00
世界 e6885e9967 platform: Ignore momentary pause on iOS 2024-02-09 13:57:47 +08:00
世界 f3fa09c3df Bump Go version 2024-02-08 20:31:40 +08:00
世界 e2090923db Bump Go version 2024-02-08 20:31:40 +08:00
世界 cf9316118c Fix external controller crash before started 2024-02-08 20:31:40 +08:00
世界 46be319976 Fix external controller crash before started 2024-02-08 20:31:40 +08:00
renovate[bot]and世界 57094b2323 [dependencies] Update actions/cache action to v4 2024-02-03 15:08:41 +08:00
renovate[bot]and世界 b27bc45cf2 [dependencies] Update actions/cache action to v4 2024-02-03 15:08:41 +08:00
世界 1a5ed7e151 documentation: Bump version 2024-02-02 17:51:40 +08:00
世界 3d735281f4 documentation: Bump version 2024-02-02 17:51:40 +08:00
世界 476c373153 Fix android interface monitor 2024-02-02 17:51:40 +08:00
世界 8760a0d94d Fix android interface monitor 2024-02-02 17:51:40 +08:00
世界 2b2c68963c Remove duplicated rules 2024-02-02 14:30:27 +08:00
世界 2239b59933 Remove duplicated rules 2024-02-02 14:30:27 +08:00
世界 dfff320763 Fix rawConn not closed for hy/hy2 2024-02-02 14:30:27 +08:00
世界 425a63f59d Fix rawConn not closed for hy/hy2 2024-02-02 14:30:27 +08:00
世界 9c62d66cce urltest: Remember the last choice when there is no valid result 2024-02-02 11:27:36 +08:00
世界 b85725c009 urltest: Remember the last choice when there is no valid result 2024-02-02 11:27:36 +08:00
世界 b1e0497e73 Fix UDP DNS response not truncated 2024-02-01 14:43:59 +08:00
世界 17aebc56c1 Fix UDP DNS response not truncated 2024-02-01 14:43:59 +08:00
Devmanand世界 e64bc1ea54 Fix mobile build on windows
gobind executable name is not exactly `gobind` on windows it's `gobind.exe`

Signed-off-by: Devman <85770917+amir-devman@users.noreply.github.com>
2024-02-01 12:07:39 +08:00
Devmanand世界 f76b21b02c Fix mobile build on windows
gobind executable name is not exactly `gobind` on windows it's `gobind.exe`

Signed-off-by: Devman <85770917+amir-devman@users.noreply.github.com>
2024-02-01 12:07:39 +08:00
kkocdkoandGitHub 7b6d57c9b4 Fix rule description header of domain_suffix
I read other rule_item_xxx.go files, they are all snake case. This description is showed on dashboard like yacd.

Signed-off-by: kkocdko <31189892+kkocdko@users.noreply.github.com>
2024-02-01 10:42:12 +08:00
kkocdkoandGitHub 704545a2ec Fix rule description header of domain_suffix
I read other rule_item_xxx.go files, they are all snake case. This description is showed on dashboard like yacd.

Signed-off-by: kkocdko <31189892+kkocdko@users.noreply.github.com>
2024-02-01 10:42:12 +08:00
dyhkwongandGitHub 8e6ed75e33 Fix loop back detector 2024-02-01 10:41:38 +08:00
dyhkwongandGitHub dc7b7afc06 Fix loop back detector 2024-02-01 10:41:38 +08:00
世界 aa456a008a Update workflow 2024-01-24 12:21:18 +08:00
世界 e478d3c2dc Update workflow 2024-01-24 12:21:18 +08:00
世界 482fd879c1 documentation: Bump version 2024-01-23 11:57:28 +08:00
世界 c8318058bb documentation: Bump version 2024-01-23 11:57:28 +08:00
世界 ccd23aed0f documentation: Update geosite usage 2024-01-23 11:57:28 +08:00
世界 abca2118e7 documentation: Update geosite usage 2024-01-23 11:57:28 +08:00
世界 a4d717c8d9 platform: Add service error wrapper for macOS system extension 2024-01-22 19:00:09 +08:00
世界 a8ee41715a platform: Add service error wrapper for macOS system extension 2024-01-22 19:00:09 +08:00
世界 9ffb1f57cd Update dependencies 2024-01-22 14:37:21 +08:00
世界 94f76d6671 Update dependencies 2024-01-22 14:37:21 +08:00
世界 9a246d5950 Fix missing write result in TFO open 2024-01-19 11:22:13 +08:00
世界 bf6cc8903c Fix missing write result in TFO open 2024-01-19 11:22:13 +08:00
世界 4b5d43d4c2 Add sponsor button 2024-01-19 11:22:13 +08:00
世界 1b15e1692a Add sponsor button 2024-01-19 11:22:13 +08:00
世界 f91575b98d Fix missing loopback detect 2024-01-19 11:22:12 +08:00
世界 017372db25 Fix missing loopback detect 2024-01-19 11:22:12 +08:00
世界 a2f5e28b59 documentation: Bump version 2024-01-16 05:50:07 +08:00
世界 216a0380fe documentation: Bump version 2024-01-16 05:50:07 +08:00
Noob Zhangand世界 e4f3c83769 Add network-online.target in .service files
This helps the daemon work better on IoT devices
like RaspberryPi.
According to systemd's documentation,
`network.target` means there has already been
a network manager started, but the network may
not be "up". On most PCs this does not matter
because the network will turn to "up" almost
immidiately. The IoT devices' network interface
may not be set up quickly enough, so they may
meet that the sing-box daemon is started before
network is ready, which results that sing-box
cannot find a working route. The workaround
of this is restarting sing-box daemon but it
absolutely is not the perfect solution.
As `network-online.target` must be triggered by
network manager after you configured it, I keep
`network.target` so there will be no change to
those who do not enabled proper trigger service
like `NetworkManager-wait-online.service`.

See also: https://systemd.io/NETWORK_ONLINE/
2024-01-16 05:50:07 +08:00
Noob Zhangand世界 71b9e4ff17 Add network-online.target in .service files
This helps the daemon work better on IoT devices
like RaspberryPi.
According to systemd's documentation,
`network.target` means there has already been
a network manager started, but the network may
not be "up". On most PCs this does not matter
because the network will turn to "up" almost
immidiately. The IoT devices' network interface
may not be set up quickly enough, so they may
meet that the sing-box daemon is started before
network is ready, which results that sing-box
cannot find a working route. The workaround
of this is restarting sing-box daemon but it
absolutely is not the perfect solution.
As `network-online.target` must be triggered by
network manager after you configured it, I keep
`network.target` so there will be no change to
those who do not enabled proper trigger service
like `NetworkManager-wait-online.service`.

See also: https://systemd.io/NETWORK_ONLINE/
2024-01-16 05:50:07 +08:00
printferand世界 95b55f685c Enhanced light/dark mode support in mkdocs configuration 2024-01-16 05:50:07 +08:00
printferand世界 9b7deb5246 Enhanced light/dark mode support in mkdocs configuration 2024-01-16 05:50:07 +08:00
世界 648ca171ff Fix missing upstream func for read wait conn 2024-01-16 05:50:07 +08:00
世界 a850a73e1a Fix missing upstream func for read wait conn 2024-01-16 05:50:07 +08:00
世界 99efc2d191 Fix rule match 2024-01-14 13:01:57 +08:00
世界 c4d9be9e0d Fix rule match 2024-01-14 13:01:57 +08:00
世界 d5d1b98ab4 documentation: Bump version 2024-01-09 12:22:22 +08:00
世界 f31c604b3d documentation: Bump version 2024-01-09 12:22:22 +08:00
世界 08c146764e Fix TLS conn cast for vision 2024-01-09 12:22:22 +08:00
世界 4c8a50a52b Fix TLS conn cast for vision 2024-01-09 12:22:22 +08:00
世界 21114fea85 Update dependencies 2024-01-09 12:22:22 +08:00
世界 b326e60998 Update dependencies 2024-01-09 12:22:22 +08:00
世界 834cd09de0 documentation: Bump version 2024-01-05 11:17:49 +08:00
世界 11bec79a06 documentation: Bump version 2024-01-05 11:17:49 +08:00
世界 762726d3b1 documentation: remove usages of category-companies@cn since merged into cn 2024-01-03 12:21:53 +08:00
世界 16eff06c37 documentation: remove usages of category-companies@cn since merged into cn 2024-01-03 12:21:53 +08:00
世界 f7674643ef documentation: Update package managers 2024-01-03 12:21:48 +08:00
世界 2911eba236 documentation: Update package managers 2024-01-03 12:21:48 +08:00
世界 7f53201a17 Remove unnecessary context wrappers 2024-01-03 12:21:48 +08:00
世界 2e607118c3 Remove unnecessary context wrappers 2024-01-03 12:21:48 +08:00
世界 b974c713b8 Improve read wait interface &
Refactor Authenticator interface to struct &
Update smux &
Update gVisor to 20231204.0 &
Update quic-go to v0.40.1 &
Update wireguard-go &
Add GSO support for TUN/WireGuard &
Fix router pre-start &
Fix bind forwarder to interface for systems stack
2024-01-03 12:21:47 +08:00
世界 89c723e3e4 Improve read wait interface &
Refactor Authenticator interface to struct &
Update smux &
Update gVisor to 20231204.0 &
Update quic-go to v0.40.1 &
Update wireguard-go &
Add GSO support for TUN/WireGuard &
Fix router pre-start &
Fix bind forwarder to interface for systems stack
2024-01-03 12:21:47 +08:00
世界 2b9897dbb8 Make generated files have SUDO_USER's permissions if possible. 2024-01-03 12:21:47 +08:00
世界 35fd9de3ff Make generated files have SUDO_USER's permissions if possible. 2024-01-03 12:21:47 +08:00
世界 adc424188c Refactor inbound/outbound options struct 2024-01-03 12:21:47 +08:00
世界 6ddcd3954d Refactor inbound/outbound options struct 2024-01-03 12:21:47 +08:00
世界 5feb71d8dc Improve configuration merge 2024-01-03 12:21:47 +08:00
世界 36b0f2e91a Improve configuration merge 2024-01-03 12:21:47 +08:00
世界 7778f0014d Update uTLS to 1.5.4 2024-01-03 12:21:47 +08:00
世界 fe053e26b5 Update uTLS to 1.5.4 2024-01-03 12:21:47 +08:00
世界 217381770c Update tfo-go 2024-01-03 12:21:47 +08:00
世界 269434cfe6 Update tfo-go 2024-01-03 12:21:47 +08:00
世界 c809d20c07 Update gomobile and add tag 2024-01-03 12:21:46 +08:00
世界 88495a24dc Update gomobile and add tag 2024-01-03 12:21:46 +08:00
世界 1d0558f731 Update cloudflare-tls to go1.21.5 2024-01-03 12:21:46 +08:00
世界 d131a7c10a Update cloudflare-tls to go1.21.5 2024-01-03 12:21:46 +08:00
世界 5b055062df Make type check strict 2024-01-03 12:21:46 +08:00
世界 744a5d703b Make type check strict 2024-01-03 12:21:46 +08:00
世界 e5e750429a Remove comparable limit for Listable 2024-01-03 12:21:46 +08:00
世界 09421b6378 Remove comparable limit for Listable 2024-01-03 12:21:46 +08:00
世界 b0bd3571c6 Avoid opening log output before start &
Replace tracing logs with task monitor
2024-01-03 12:21:46 +08:00
世界 21283b554a Avoid opening log output before start &
Replace tracing logs with task monitor
2024-01-03 12:21:46 +08:00
世界 52c3672368 Update documentation 2024-01-03 12:21:37 +08:00
世界 25810b50c1 Update documentation 2024-01-03 12:21:37 +08:00
世界 d4d4215219 Add idle_timeout for URLTest outbound 2024-01-03 12:21:37 +08:00
世界 f1e3a59db3 Add idle_timeout for URLTest outbound 2024-01-03 12:21:37 +08:00
世界 ec194f6e67 Skip internal fake-ip queries 2024-01-03 12:21:37 +08:00
世界 a99deb2cb5 Skip internal fake-ip queries 2024-01-03 12:21:37 +08:00
世界 6d035efb3e Migrate contentjson and badjson to library &
Add omitempty in format
2024-01-03 12:21:37 +08:00
世界 38d28e0763 Migrate contentjson and badjson to library &
Add omitempty in format
2024-01-03 12:21:37 +08:00
世界 545a01f5e9 Update documentation 2024-01-03 12:21:36 +08:00
世界 e09a94bb9e Update documentation 2024-01-03 12:21:36 +08:00
世界 5881a56955 Independent source_ip_is_private and ip_is_private rules 2024-01-03 12:21:36 +08:00
世界 a21c5324fd Independent source_ip_is_private and ip_is_private rules 2024-01-03 12:21:36 +08:00
世界 cc0d17c2ec Add rule-set 2024-01-03 12:21:36 +08:00
世界 4b43acfec0 Add rule-set 2024-01-03 12:21:36 +08:00
世界 3ab5403947 Update buffer usage 2024-01-03 12:21:36 +08:00
世界 7df151e820 Update buffer usage 2024-01-03 12:21:36 +08:00
世界 53bbce58c3 Allow nested logical rules 2024-01-03 12:21:36 +08:00
世界 5948ffb965 Allow nested logical rules 2024-01-03 12:21:36 +08:00
世界 8b8c501c33 Migrate to independent cache file 2024-01-03 12:21:36 +08:00
世界 bf4e556f67 Migrate to independent cache file 2024-01-03 12:21:36 +08:00
世界 39330d2bab documentation: Bump version 2024-01-02 14:31:53 +08:00
世界 e3f8567690 documentation: Bump version 2024-01-02 14:31:53 +08:00
世界 333a6dca6d Fix geoip close 2024-01-02 14:31:23 +08:00
世界 40c7f3e170 Fix geoip close 2024-01-02 14:31:23 +08:00
世界 93fd758295 Fix grpc lite transport encoding 2024-01-01 16:16:58 +08:00
世界 c506255e0f Fix grpc lite transport encoding 2024-01-01 16:16:58 +08:00
世界 76905fc7da Fix h2mux request context 2024-01-01 16:15:49 +08:00
世界 87c6fd4c0f Fix h2mux request context 2024-01-01 16:15:49 +08:00
世界 561a96fc3f documentation: Bump version 2023-12-29 18:00:40 +08:00
世界 19c445d28e documentation: Bump version 2023-12-29 18:00:40 +08:00
世界 b693cbe2bc dcoumentation: Fix description of cipher_suites 2023-12-29 18:00:40 +08:00
世界 9119a5209b dcoumentation: Fix description of cipher_suites 2023-12-29 18:00:40 +08:00
世界 b784b934b0 Fix pprof URL path 2023-12-29 18:00:40 +08:00
世界 46c8d6e61f Fix pprof URL path 2023-12-29 18:00:40 +08:00
世界 7218389bc0 Update dependencies 2023-12-27 10:37:18 +08:00
世界 ea17c2786d Update dependencies 2023-12-27 10:37:18 +08:00
世界 588a455aef Fix mux test 2023-12-27 10:30:19 +08:00
世界 12ababd911 Fix mux test 2023-12-27 10:30:19 +08:00
世界 8b16c1a355 Update issue reporting templates
Enhanced the issue reporting templates for both English and Chinese versions by adding more structured and comprehensive guideline checkboxes. This aims to ensure contributors provide sufficient and beneficial information for reproducing and resolving issues, thereby improving the quality of reports and making issue tracking more efficient.
2023-12-26 19:05:19 +08:00
世界 0523845833 Update issue reporting templates
Enhanced the issue reporting templates for both English and Chinese versions by adding more structured and comprehensive guideline checkboxes. This aims to ensure contributors provide sufficient and beneficial information for reproducing and resolving issues, thereby improving the quality of reports and making issue tracking more efficient.
2023-12-26 19:05:19 +08:00
renovate[bot]and世界 f61d289c1b [dependencies] Update actions/upload-artifact action to v4 2023-12-26 19:04:51 +08:00
renovate[bot]and世界 57794919fa [dependencies] Update actions/upload-artifact action to v4 2023-12-26 19:04:51 +08:00
世界 a528370036 Fix missing marshal for udp_timeout 2023-12-26 10:52:46 +08:00
世界 f5bb5cf343 Fix missing marshal for udp_timeout 2023-12-26 10:52:46 +08:00
世界 700a8e85ce Fix ACME ALPN conflict 2023-12-26 09:02:58 +08:00
世界 3eed614dea Fix ACME ALPN conflict 2023-12-26 09:02:58 +08:00
世界 da07ed0942 Fix missing nil check for URLTest 2023-12-26 09:02:58 +08:00
世界 76a295a660 Fix missing nil check for URLTest 2023-12-26 09:02:58 +08:00
世界 ac331c3322 Fix V2Ray transport path validation behavior 2023-12-26 09:02:58 +08:00
世界 082e3fb8df Fix V2Ray transport path validation behavior 2023-12-26 09:02:58 +08:00
世界 8fece96367 Fix websocket client initialize 2023-12-22 20:38:06 +08:00
世界 a0cab4f563 Fix websocket client initialize 2023-12-22 20:38:06 +08:00
世界 07e555dd48 documentation: Bump version 2023-12-21 15:25:19 +08:00
世界 aeb7308e81 documentation: Bump version 2023-12-21 15:25:19 +08:00
世界 50f2311035 documentation: Fix link format 2023-12-21 15:24:05 +08:00
世界 bb1ebfda83 documentation: Fix link format 2023-12-21 15:24:05 +08:00
世界 6d062dc366 Fix missing UDP timeout for QUIC protocols 2023-12-21 15:16:36 +08:00
世界 c05c798221 Fix missing UDP timeout for QUIC protocols 2023-12-21 15:16:36 +08:00
世界 3a64f099ff Migrate udp_timeout from seconds to duration format 2023-12-21 14:50:33 +08:00
世界 55b1bcc6a5 Migrate udp_timeout from seconds to duration format 2023-12-21 14:50:33 +08:00
世界 143af89fc2 Fix missing handshake timeout for multiplex 2023-12-21 14:21:59 +08:00
世界 d6eddce420 Fix missing handshake timeout for multiplex 2023-12-21 14:21:59 +08:00
世界 0a86f2459f Fix DNS dial context 2023-12-21 14:19:27 +08:00
世界 4bf057139b Fix DNS dial context 2023-12-21 14:19:27 +08:00
世界 3bdca84f1b Try to fix HTTP server leak again 2023-12-21 14:16:16 +08:00
世界 a1b28b8282 Try to fix HTTP server leak again 2023-12-21 14:16:16 +08:00
世界 859d467b7e Fix direct UDP override 2023-12-18 21:48:59 +08:00
世界 d0aaf71770 Fix direct UDP override 2023-12-18 21:48:59 +08:00
世界 f3618b9e5f documentation: Update shadowsocks example
Remove the information on password generation for `2022-blake3-aes-128-gcm` cipher from the Server Example section in the shadowsocks.md file as it is no longer needed.
2023-12-14 21:05:41 +08:00
世界 2f31202c6b documentation: Update shadowsocks example
Remove the information on password generation for `2022-blake3-aes-128-gcm` cipher from the Server Example section in the shadowsocks.md file as it is no longer needed.
2023-12-14 21:05:41 +08:00
renovate[bot]and世界 ebc00e769e [dependencies] Update github-actions 2023-12-14 15:14:22 +08:00
renovate[bot]and世界 e4cc510712 [dependencies] Update github-actions 2023-12-14 15:14:22 +08:00
世界 5e735ec619 Update dependencies 2023-12-14 15:09:03 +08:00
世界 e329bf6865 Update dependencies 2023-12-14 15:09:03 +08:00
世界 33fbbd2697 platform: Fix check config 2023-12-12 20:26:41 +08:00
世界 2badcec765 platform: Fix check config 2023-12-12 20:26:41 +08:00
世界 61ba3e7c7a documentation: Bump version 2023-12-12 13:54:23 +08:00
世界 e71c13b1a2 documentation: Bump version 2023-12-12 13:54:23 +08:00
世界 626471e41c FIx error handling for netlink banned in Android 2023-12-12 13:54:23 +08:00
世界 a959a67ed3 FIx error handling for netlink banned in Android 2023-12-12 13:54:23 +08:00
世界 e222f36c11 platform: Fix VPN route 2023-12-11 21:59:59 +08:00
世界 a1044af579 platform: Fix VPN route 2023-12-11 21:59:59 +08:00
世界 37e7269395 Update dependencies 2023-12-11 21:40:11 +08:00
世界 a64b57451a Update dependencies 2023-12-11 21:40:11 +08:00
世界 d9db5d6aa3 Fix auto-route IPv6 on darwin 2023-12-11 21:39:29 +08:00
世界 f0e2318cbd Fix auto-route IPv6 on darwin 2023-12-11 21:39:29 +08:00
世界 3cb0bd950d documentation: Bump version 2023-12-09 00:22:27 +08:00
世界 ebec308fd8 documentation: Bump version 2023-12-09 00:22:27 +08:00
世界 8f8796604b Fix incorrect dependency 2023-12-09 00:22:27 +08:00
世界 ca094587be Fix incorrect dependency 2023-12-09 00:22:27 +08:00
世界 2e5aa83801 Update bug report template 2023-12-08 21:56:30 +08:00
世界 ca3b86c781 Update bug report template 2023-12-08 21:56:30 +08:00
世界 4287a4fd69 documentation: Bump version 2023-12-08 21:38:34 +08:00
世界 5a1d0047b9 documentation: Bump version 2023-12-08 21:38:34 +08:00
世界 b492e15541 Fix method check for v2ray HTTP transport 2023-12-08 21:12:52 +08:00
世界 4669854039 Fix method check for v2ray HTTP transport 2023-12-08 21:12:52 +08:00
世界 b919564a98 Fix gun conn setup 2023-12-08 21:10:36 +08:00
世界 2eecdc38a4 Fix gun conn setup 2023-12-08 21:10:36 +08:00
世界 4a1f6c7b2a Update dependencies 2023-12-08 11:18:52 +08:00
世界 83581b7c1a Update dependencies 2023-12-08 11:18:52 +08:00
世界 d2d65ef556 Fix HTTP connect client again 2023-12-08 11:18:52 +08:00
世界 d346f0023d Fix HTTP connect client again 2023-12-08 11:18:52 +08:00
世界 ec07038451 Fix fallback packet conn 2023-12-06 18:47:50 +08:00
世界 47b7a29cbd Fix fallback packet conn 2023-12-06 18:47:50 +08:00
世界 4999ce6354 Fix missing omitempty for NTP server fields 2023-12-05 18:32:21 +08:00
世界 cffc07579d Fix missing omitempty for NTP server fields 2023-12-05 18:32:21 +08:00
世界 c2c7d4382b Prevent nil LocalAddr or RemoteAddr 2023-12-05 15:11:09 +08:00
世界 0ef268637e Prevent nil LocalAddr or RemoteAddr 2023-12-05 15:11:09 +08:00
世界 9abd513f17 Update dependencies 2023-12-04 21:06:15 +08:00
世界 50f5a76380 Update dependencies 2023-12-04 21:06:15 +08:00
世界 3930ef49e4 Fix crash on websocket concurrent request 2023-12-04 20:42:01 +08:00
世界 20ca05dd36 Fix crash on websocket concurrent request 2023-12-04 20:42:01 +08:00
世界 a587abb585 documentation: Bump version 2023-12-03 16:54:49 +08:00
世界 5a792b186a documentation: Bump version 2023-12-03 16:54:49 +08:00
世界 d8aadfbf72 Fix not set Host header for HTTP outbound 2023-12-03 16:54:49 +08:00
世界 3f458064a3 Fix not set Host header for HTTP outbound 2023-12-03 16:54:49 +08:00
世界 548715daec Fix URLTest outbound 2023-12-02 17:55:58 +08:00
世界 5269231df0 Fix URLTest outbound 2023-12-02 17:55:58 +08:00
世界 3b609245f9 documentation: Bump version 2023-12-01 20:39:01 +08:00
世界 fc8e49994c documentation: Bump version 2023-12-01 20:39:01 +08:00
世界 60d0d8b946 Fix URLTest group early start 2023-12-01 20:39:01 +08:00
世界 e911d4aa4b Fix URLTest group early start 2023-12-01 20:39:01 +08:00
世界 b246666713 Fix deadline usage 2023-12-01 20:39:01 +08:00
世界 01f6e70bc5 Fix deadline usage 2023-12-01 20:39:01 +08:00
世界 3e36e4e1d3 documentation: Bump version 2023-11-29 21:01:28 +08:00
世界 5f1e39a42c documentation: Bump version 2023-11-29 21:01:28 +08:00
世界 ba385b7de4 Update dependencies 2023-11-29 21:01:19 +08:00
世界 4f7770e254 Update dependencies 2023-11-29 21:01:19 +08:00
世界 9858ac2588 documentation: Bump version & Refactor docs 2023-11-28 11:21:57 +08:00
世界 e8c4c942c0 documentation: Bump version & Refactor docs 2023-11-28 11:21:57 +08:00
世界 0645e0d7b4 Add wifi_ssid and wifi_bssid route and DNS rules 2023-11-28 11:21:44 +08:00
世界 253976d6c0 Add wifi_ssid and wifi_bssid route and DNS rules 2023-11-28 11:21:44 +08:00
世界 0c300e5220 Update quic-go to v0.40.0 2023-11-28 11:21:44 +08:00
世界 f0571b4122 Update quic-go to v0.40.0 2023-11-28 11:21:44 +08:00
世界 20fddad789 Migrate multiplex and UoT server to inbound & Add tcp-brutal support for multiplex 2023-11-28 11:21:44 +08:00
世界 1b71e52e90 Migrate multiplex and UoT server to inbound & Add tcp-brutal support for multiplex 2023-11-28 11:21:44 +08:00
世界 6a36a97c3c Add support for v2ray http upgrade transport 2023-11-28 11:21:44 +08:00
世界 6d24be23da Add support for v2ray http upgrade transport 2023-11-28 11:21:44 +08:00
世界 c789941bc5 Add exclude route support for tun &
Update gVisor to 20231113.0
2023-11-28 11:21:43 +08:00
世界 2a45c178fa Add exclude route support for tun &
Update gVisor to 20231113.0
2023-11-28 11:21:43 +08:00
世界 50994105b9 Add udp_disable_domain_unmapping inbound listen option 2023-11-28 11:21:43 +08:00
世界 81e214812f Add udp_disable_domain_unmapping inbound listen option 2023-11-28 11:21:43 +08:00
世界 c5ff662faa Migrate to gobwas/ws 2023-11-28 11:21:43 +08:00
世界 4d23773a25 Migrate to gobwas/ws 2023-11-28 11:21:43 +08:00
世界 4686f58b24 Fix dhcp reset 2023-11-28 11:20:48 +08:00
世界 40a0b69918 Fix dhcp reset 2023-11-28 11:20:48 +08:00
世界 1305f685f6 documentation: Bump version 2023-11-24 20:58:48 +08:00
世界 a7b37c5953 documentation: Bump version 2023-11-24 20:58:48 +08:00
世界 5a1cfe44f2 Fix cachefile permission 2023-11-24 20:58:48 +08:00
世界 03663a5093 Fix cachefile permission 2023-11-24 20:58:48 +08:00
世界 cf9cba9d4f Fix "Fix HTTP server leak" 2023-11-24 19:58:31 +08:00
世界 b08226a850 Fix "Fix HTTP server leak" 2023-11-24 19:58:31 +08:00
世界 f7a3fbbdcf Fix missing UDP user context on TUIC/Hysteria2 inbounds 2023-11-24 19:56:43 +08:00
世界 edbae5dc4d Fix missing UDP user context on TUIC/Hysteria2 inbounds 2023-11-24 19:56:43 +08:00
世界 fc7251dab9 Remove unused code 2023-11-24 19:55:53 +08:00
世界 0f8ad0234b Remove unused code 2023-11-24 19:55:53 +08:00
世界 e79ea01a40 documentation: Bump version 2023-11-21 10:22:44 +08:00
世界 661eadc3bd documentation: Bump version 2023-11-21 10:22:44 +08:00
世界 7e6c4659fd Update dependencies 2023-11-21 10:22:44 +08:00
世界 50c1290567 Update dependencies 2023-11-21 10:22:44 +08:00
世界 373142bc0f Fix platform API check 2023-11-21 10:22:44 +08:00
世界 eaccc9759a Fix platform API check 2023-11-21 10:22:44 +08:00
世界 77cb4c5667 Add test for ss2022 EIH 2023-11-20 18:36:44 +08:00
世界 925214869b Add test for ss2022 EIH 2023-11-20 18:36:44 +08:00
世界 52ff016565 Fix QUIC sniffer 2023-11-16 22:48:16 +08:00
世界 6a2bfd26d0 Fix QUIC sniffer 2023-11-16 22:48:16 +08:00
世界 f76bf97117 Fix "Fix Linux IPv6 auto route rules" 2023-11-16 18:25:07 +08:00
世界 72a81afb76 Fix "Fix Linux IPv6 auto route rules" 2023-11-16 18:25:07 +08:00
世界 1bec993af7 Fix zero TTL was incorrectly reset 2023-11-16 18:25:07 +08:00
世界 240abe204c Fix zero TTL was incorrectly reset 2023-11-16 18:25:07 +08:00
世界 835aeba26d build: Fix bad environment key 2023-11-16 01:42:24 +08:00
世界 7c49196792 build: Fix bad environment key 2023-11-16 01:42:24 +08:00
嫦悅and世界 474e2f2880 documentation: Fix typo
The old meaning is wrong. Correct the meaning according to the English documentation and the actual effect of the option.

Signed-off-by: 嫦悅 <lomombwlo@gmail.com>
2023-11-16 01:12:26 +08:00
嫦悅and世界 3a2808cff6 documentation: Fix typo
The old meaning is wrong. Correct the meaning according to the English documentation and the actual effect of the option.

Signed-off-by: 嫦悅 <lomombwlo@gmail.com>
2023-11-16 01:12:26 +08:00
guangwuandGitHub 3e398a71b0 chore: unnecessary use of fmt.Sprintf 2023-11-16 01:10:52 +08:00
guangwuandGitHub 005d6cf4cf chore: unnecessary use of fmt.Sprintf 2023-11-16 01:10:52 +08:00
世界 c3cac5c64e documentation: Bump version 2023-11-15 14:10:37 +08:00
世界 36dff630d6 documentation: Bump version 2023-11-15 14:10:37 +08:00
世界 3c08ab6689 platform: Refactor log interface 2023-11-15 14:10:37 +08:00
世界 1825869124 platform: Refactor log interface 2023-11-15 14:10:37 +08:00
世界 cb327ddb23 Fix TUIC authentication failed error message 2023-11-14 20:15:41 +08:00
世界 3cadc90375 Fix TUIC authentication failed error message 2023-11-14 20:15:41 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
b89fae8f11 dependencies: Update actions/checkout digest to b4ffde6
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-14 20:15:41 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2c6967d7f9 dependencies: Update actions/checkout digest to b4ffde6
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-14 20:15:41 +08:00
世界 5715a1c750 Fix sing-tun version 2023-11-14 20:15:41 +08:00
世界 fe866b123a Fix sing-tun version 2023-11-14 20:15:41 +08:00
世界 a23c6c459f Remove apk build due to missing openrc configuration 2023-11-14 20:15:41 +08:00
世界 cbef1b1e59 Remove apk build due to missing openrc configuration 2023-11-14 20:15:41 +08:00
世界 f2fdda19b1 build: Fix missing linux/386 2023-11-14 10:35:27 +08:00
世界 e21f84932c build: Fix missing linux/386 2023-11-14 10:35:27 +08:00
0x7d274284andGitHub 8ef0a50fab Fix Dockerfile
Keep the .git folder at compile time to get the correct version

Signed-off-by: 0x7d274284 <112329548+0x7d274284@users.noreply.github.com>
2023-11-14 10:34:38 +08:00
0x7d274284andGitHub 7a679bc328 Fix Dockerfile
Keep the .git folder at compile time to get the correct version

Signed-off-by: 0x7d274284 <112329548+0x7d274284@users.noreply.github.com>
2023-11-14 10:34:38 +08:00
世界 e763c61086 documentation: Bump version 2023-11-13 21:50:36 +08:00
世界 6635dd9abc documentation: Bump version 2023-11-13 21:50:36 +08:00
世界 5d9b32c010 build: Add apk and archlinux package builds 2023-11-13 15:28:28 +08:00
世界 ce164724ea build: Add apk and archlinux package builds 2023-11-13 15:28:28 +08:00
世界andmaskedeken 5ae8063245 Fix trojan-go mux context
Co-authored-by: maskedeken <maskedeken@yahoo.com>
Co-authored-by: 世界 <i@sekai.icu>
2023-11-13 14:12:35 +08:00
世界andmaskedeken a3ef7a7d88 Fix trojan-go mux context
Co-authored-by: maskedeken <maskedeken@yahoo.com>
Co-authored-by: 世界 <i@sekai.icu>
2023-11-13 14:12:35 +08:00
世界 6d89273e75 build: Unify build tags 2023-11-13 14:12:35 +08:00
世界 71218ef0d3 build: Unify build tags 2023-11-13 14:12:35 +08:00
世界andMahdi-zarei 49dff77477 Fix not closing outConn
Co-authored-by: Mahdi-zarei  <mahdi.zrei@gmail.com>
Co-authored-by: 世界 <i@sekai.icu>
2023-11-13 13:54:03 +08:00
世界andMahdi-zarei e777b4c6dc Fix not closing outConn
Co-authored-by: Mahdi-zarei  <mahdi.zrei@gmail.com>
Co-authored-by: 世界 <i@sekai.icu>
2023-11-13 13:54:03 +08:00
世界 ade2b7237c build: Update Go to 1.20.11 for legacy builds 2023-11-13 13:47:15 +08:00
世界 6815f94180 build: Update Go to 1.20.11 for legacy builds 2023-11-13 13:47:15 +08:00
世界 a65872c306 tun: Fix broadcast filter not applied to mixed stack 2023-11-13 13:35:10 +08:00
世界 b013acd89d tun: Fix broadcast filter not applied to mixed stack 2023-11-13 13:35:10 +08:00
世界 09ff10980c Fix v2ray ws crash 2023-11-13 13:34:31 +08:00
世界 f7c2eb6e76 Fix v2ray ws crash 2023-11-13 13:34:31 +08:00
世界 78c9be8b38 Update protobuf generated binary 2023-11-10 10:56:25 +08:00
世界 3ef9b1b343 Update protobuf generated binary 2023-11-10 10:56:25 +08:00
SakuraWaldand世界 8130d9c34b Fix issue template 2023-11-10 10:36:46 +08:00
SakuraWaldand世界 2224c68959 Fix issue template 2023-11-10 10:36:46 +08:00
Kumiko as a ServiceandGitHub 68bef1e0ab Use golang's cross-compilation capabilities 2023-11-10 10:36:32 +08:00
Kumiko as a ServiceandGitHub bb7d03d1db Use golang's cross-compilation capabilities 2023-11-10 10:36:32 +08:00
世界 f2214611a1 documentation: Bump version 2023-11-10 10:24:18 +08:00
世界 50036924e8 documentation: Bump version 2023-11-10 10:24:18 +08:00
世界 06ba4a9efb Revert "Fix Host ignored in v2ray websocket transport"
This reverts commit 8d09057d50.
2023-11-09 16:55:47 +08:00
世界 c2c3f7284f Revert "Fix Host ignored in v2ray websocket transport"
This reverts commit aaa6702863.
2023-11-09 16:55:47 +08:00
世界 e929ae42c9 Fix mux client close 2023-11-09 16:55:47 +08:00
世界 f6fee53676 Fix mux client close 2023-11-09 16:55:47 +08:00
世界 24534f4d72 platform: Increase HTTP timeout to 15s 2023-11-09 16:55:47 +08:00
世界 63b8e8ed23 platform: Increase HTTP timeout to 15s 2023-11-09 16:55:47 +08:00
世界 46bd244867 build: Update gradle command 2023-11-09 16:55:47 +08:00
世界 6ae86eda98 build: Update gradle command 2023-11-09 16:55:47 +08:00
世界 779b79ae57 build: Fix tag calculate 2023-11-07 22:27:37 +08:00
世界 267d9617b7 build: Fix tag calculate 2023-11-07 22:27:37 +08:00
世界 a8cad555ec platform: Fix legacy code 2023-11-07 22:14:23 +08:00
世界 0a06ccae50 platform: Fix legacy code 2023-11-07 22:14:23 +08:00
世界 e97028e171 documentation: Bump version 2023-11-07 10:20:05 +08:00
世界 8de0fad9f5 documentation: Bump version 2023-11-07 10:20:05 +08:00
世界 865c98760f Fix build script 2023-11-07 10:20:05 +08:00
世界 e05bf6308e Fix build script 2023-11-07 10:20:05 +08:00
世界 984b6502ce Add broadcast filter 2023-11-07 10:20:05 +08:00
世界 a20a0cb455 Add broadcast filter 2023-11-07 10:20:05 +08:00
世界 64ea329b5f documentation: Bump version 2023-11-06 19:37:45 +08:00
世界 d29f7475d2 documentation: Bump version 2023-11-06 19:37:45 +08:00
世界 8d09057d50 Fix Host ignored in v2ray websocket transport 2023-11-05 23:27:11 +08:00
世界 aaa6702863 Fix Host ignored in v2ray websocket transport 2023-11-05 23:27:11 +08:00
世界 ed5d70c5f9 Fix missing default next proto in hysteria2 2023-11-05 23:11:40 +08:00
世界 bb928f096a Fix missing default next proto in hysteria2 2023-11-05 23:11:40 +08:00
johnthecoderproand世界 7876cbd324 Fix download geo resources 2023-11-05 16:03:15 +08:00
johnthecoderproand世界 9f01d5c5b4 Fix download geo resources 2023-11-05 16:03:15 +08:00
世界 5e27c33062 Update release script 2023-11-05 16:02:18 +08:00
世界 11629a931b Update release script 2023-11-05 16:02:18 +08:00
世界 20f42cefcc Update dependencies 2023-11-05 16:02:10 +08:00
世界 126f825241 Update dependencies 2023-11-05 16:02:10 +08:00
世界 e77fd74aff Add multicast filter for tun 2023-11-04 08:04:17 +08:00
世界 998cc7bd22 Add multicast filter for tun 2023-11-04 08:04:17 +08:00
世界 236f96aada Update dependencies 2023-10-31 18:24:58 +08:00
世界 3efccaa8f5 Update dependencies 2023-10-31 18:24:58 +08:00
世界 caeea9d081 documentation: Add privacy policy for android 2023-10-31 17:32:18 +08:00
世界 d57b35ec30 documentation: Add privacy policy for android 2023-10-31 17:32:18 +08:00
世界 00a39ccd2c documentation: Bump version 2023-10-30 13:59:49 +08:00
世界 e82dab027d documentation: Bump version 2023-10-30 13:59:49 +08:00
世界 88985c7b59 docs: Remove obsolete fields 2023-10-30 13:59:49 +08:00
世界 9350f3983b docs: Remove obsolete fields 2023-10-30 13:59:49 +08:00
世界 b8ff62648f android: Add build info tools for debug 2023-10-30 12:41:24 +08:00
世界 53b123241f android: Add build info tools for debug 2023-10-30 12:41:24 +08:00
世界 6d6186af48 Add TLS self sign generate command 2023-10-30 12:41:23 +08:00
世界 97286eea1e Add TLS self sign generate command 2023-10-30 12:41:23 +08:00
世界 d8dd5dcd61 Add brutal debug option for Hysteria2 2023-10-30 12:41:23 +08:00
世界 343e24969d Add brutal debug option for Hysteria2 2023-10-30 12:41:23 +08:00
世界 5f3e5c3ba7 Update BBR and Hysteria congestion control & Migrate legacy Hysteria protocol to library 2023-10-30 12:41:22 +08:00
世界 31c294d998 Update BBR and Hysteria congestion control & Migrate legacy Hysteria protocol to library 2023-10-30 12:41:22 +08:00
世界 76efe2f533 Fix netip.Prefix usage 2023-10-30 12:41:22 +08:00
世界 3b161ab30c Fix netip.Prefix usage 2023-10-30 12:41:22 +08:00
septsand世界 11e14ad868 Improve HTTP headers option 2023-10-30 12:41:22 +08:00
septsand世界 41fd1778a7 Improve HTTP headers option 2023-10-30 12:41:22 +08:00
septsand世界 6c5d59f231 Improve naive auth logical 2023-10-30 12:41:22 +08:00
septsand世界 ac930cf1aa Improve naive auth logical 2023-10-30 12:41:22 +08:00
世界 db904d5df4 Update gVisor to 20230814.0 2023-10-30 12:41:21 +08:00
世界 e143fc510d Update gVisor to 20230814.0 2023-10-30 12:41:21 +08:00
世界 86b3f86d42 Improve linux bind interface 2023-10-30 12:41:21 +08:00
世界 bea177a4cd Improve linux bind interface 2023-10-30 12:41:21 +08:00
世界 dcc37d8327 Remove deprecated features 2023-10-30 12:41:21 +08:00
世界 aa05a4d050 Remove deprecated features 2023-10-30 12:41:21 +08:00
世界 00a13e81c2 Update workflows 2023-10-30 12:40:52 +08:00
世界 a8112ff824 Update workflows 2023-10-30 12:40:52 +08:00
世界 31c93efbfc documentation: Bump version 2023-10-30 10:42:42 +08:00
世界 a7710c3845 documentation: Bump version 2023-10-30 10:42:42 +08:00
世界 16dd9f42a9 Fix UDP domain NAT 2023-10-28 21:41:39 +08:00
世界 cb2e15f8a7 Fix UDP domain NAT 2023-10-28 21:41:39 +08:00
世界 eb2994cafa Add legacy builds for old Windows and macOS versions 2023-10-26 14:02:24 +08:00
世界 23aa8a0543 Add legacy builds for old Windows and macOS versions 2023-10-26 14:02:24 +08:00
世界 4efdff226d Fix outbound not found message 2023-10-26 14:02:19 +08:00
世界 edf7d046eb Fix outbound not found message 2023-10-26 14:02:19 +08:00
世界 f93221605a Fix Linux IPv6 auto route rules 2023-10-26 12:02:00 +08:00
世界 de0b5cc1c2 Fix Linux IPv6 auto route rules 2023-10-26 12:02:00 +08:00
世界 6401ed415b Fix TUIC server TLS config not started 2023-10-26 12:01:28 +08:00
世界 2686e8afea Fix TUIC server TLS config not started 2023-10-26 12:01:28 +08:00
世界 ba1233848d Update dependencies 2023-10-26 11:57:18 +08:00
世界 d9853ca2be Update dependencies 2023-10-26 11:57:18 +08:00
世界 31165288c7 documentation: Bump version 2023-10-23 14:09:09 +08:00
世界 b617eb5adf documentation: Bump version 2023-10-23 14:09:09 +08:00
世界 bd0a9c5eb4 makefile: Fix release command 2023-10-23 14:09:06 +08:00
世界 ddf38799e2 makefile: Fix release command 2023-10-23 14:09:06 +08:00
世界 09ac196bed makefile: Add -allowProvisioningUpdates to Apple build commands 2023-10-21 17:51:00 +08:00
世界 5291d43dc8 makefile: Add -allowProvisioningUpdates to Apple build commands 2023-10-21 17:51:00 +08:00
世界 87ec312ba9 Fix invalid address check in UoT conn 2023-10-21 17:23:30 +08:00
世界 a634830d85 Fix invalid address check in UoT conn 2023-10-21 17:23:30 +08:00
世界 ce0b428e05 Add retry for bbolt open 2023-10-14 19:24:05 +08:00
世界 e5d191ca73 Add retry for bbolt open 2023-10-14 19:24:05 +08:00
世界 542b331327 Update dependencies 2023-10-14 17:36:35 +08:00
世界 2371f0fd51 Update dependencies 2023-10-14 17:36:35 +08:00
世界 8d24b0175d Fix bbolt panic on arm32 2023-10-14 17:36:13 +08:00
世界 cfdce7a96f Fix bbolt panic on arm32 2023-10-14 17:36:13 +08:00
世界 4e51432492 documentation: Bump version 2023-10-11 12:05:31 +08:00
世界 dc8ac01dec documentation: Bump version 2023-10-11 12:05:31 +08:00
世界 f6bf94837e Fix task cancel context 2023-10-11 12:05:27 +08:00
世界 5f18738b2b Fix task cancel context 2023-10-11 12:05:27 +08:00
世界 b058bca486 Fix compatibility with Android 14 2023-10-10 15:09:49 +08:00
世界 7b4e4ca2d0 Fix compatibility with Android 14 2023-10-10 15:09:49 +08:00
世界 892a854459 platform: Also reset connections on wake 2023-10-10 15:08:18 +08:00
世界 01ba4668b6 platform: Also reset connections on wake 2023-10-10 15:08:18 +08:00
dyhkwongand世界 9fa3bf38fb Fix connect domain for IP outbound 2023-10-10 15:08:16 +08:00
dyhkwongand世界 e782d21806 Fix connect domain for IP outbound 2023-10-10 15:08:16 +08:00
世界 8c1dc1dea8 documentation: Bump version 2023-10-07 10:04:10 +08:00
世界 00155d61fc documentation: Bump version 2023-10-07 10:04:10 +08:00
世界 69a7ea2205 documentation: Bump version 2023-10-06 17:10:53 +08:00
世界 8f2273a2b4 documentation: Bump version 2023-10-06 17:10:53 +08:00
世界 7b61375da5 Update dependencies 2023-10-06 17:10:31 +08:00
世界 0d0526afa2 Update dependencies 2023-10-06 17:10:31 +08:00
世界 93afbb18c8 Fix UDP dialer network 2023-10-03 11:08:31 +08:00
世界 ac2d07b61a Fix UDP dialer network 2023-10-03 11:08:31 +08:00
世界 13d2895ee8 Fix ip_version does not take effect 2023-10-03 11:01:25 +08:00
世界 d35487f422 Fix ip_version does not take effect 2023-10-03 11:01:25 +08:00
世界 05783170f6 documentation: Bump version 2023-10-03 09:22:29 +08:00
世界 2749f4a013 documentation: Bump version 2023-10-03 09:22:29 +08:00
世界 47d7fc0b78 platform: Fix log server 2023-10-03 09:22:29 +08:00
世界 45c679648e platform: Fix log server 2023-10-03 09:22:29 +08:00
世界 4f4e7855d4 Fix HTTP inbound leak 2023-10-01 14:39:58 +08:00
世界 5f2f7fc8b9 Fix HTTP inbound leak 2023-10-01 14:39:58 +08:00
世界 568b26af76 Update xcode version script 2023-10-01 14:05:51 +08:00
世界 83c79102cf Update xcode version script 2023-10-01 14:05:51 +08:00
世界 f087275afc Update dependencies 2023-09-30 22:34:54 +08:00
世界 8b95292e53 Update dependencies 2023-09-30 22:34:54 +08:00
世界 35589e620c Fix concurrent access on task returnError 2023-09-30 21:52:11 +08:00
世界 3de7a2ddd3 Fix concurrent access on task returnError 2023-09-30 21:52:11 +08:00
Shanoa IceandGitHub 8328d55223 Fix set KDE system proxy 2023-09-30 16:44:58 +08:00
Shanoa IceandGitHub 8437a6cb4e Fix set KDE system proxy 2023-09-30 16:44:58 +08:00
世界 7af7dc8e9d documentation: Bump version 2023-09-28 16:02:54 +08:00
世界 9c4d08c6e1 documentation: Bump version 2023-09-28 16:02:54 +08:00
世界 2093f9bb38 Remove invalid code 2023-09-28 15:52:05 +08:00
世界 e26096085e Remove invalid code 2023-09-28 15:52:05 +08:00
世界 9659525b9b Fix DHCPv4 listen address 2023-09-27 18:25:23 +08:00
世界 2f1b2199c5 Fix DHCPv4 listen address 2023-09-27 18:25:23 +08:00
世界 f8eccd8906 documentation: Bump version 2023-09-27 14:16:04 +08:00
世界 af791db01f documentation: Bump version 2023-09-27 14:16:04 +08:00
世界 174ec6c5bd Update dependencies 2023-09-27 14:16:04 +08:00
世界 abcf030d89 Update dependencies 2023-09-27 14:16:04 +08:00
世界 54d871cefe Fix resolve dialer 2023-09-27 13:17:16 +08:00
世界 7840dc73e3 Fix resolve dialer 2023-09-27 13:17:16 +08:00
世界 db72fb62bd android: Fix netlink check 2023-09-26 17:41:07 +08:00
世界 df9050400e android: Fix netlink check 2023-09-26 17:41:07 +08:00
世界 44c825d92b documentation: Bump version 2023-09-25 21:56:32 +08:00
世界 fdd38d6cf8 documentation: Bump version 2023-09-25 21:56:32 +08:00
世界 52c44d3235 Reject SOCKS4 unauthenticated request 2023-09-25 21:16:14 +08:00
世界 9891fd672f Reject SOCKS4 unauthenticated request 2023-09-25 21:16:14 +08:00
世界 2d8cc77fd3 Update dependencies 2023-09-25 17:56:21 +08:00
世界 92a84ee112 Update dependencies 2023-09-25 17:56:21 +08:00
世界 c020672b9a documentation: Bump version 2023-09-24 14:40:03 +08:00
世界 992331f17e documentation: Bump version 2023-09-24 14:40:03 +08:00
世界 f107f7cee7 Fix payload not return to pool 2023-09-24 14:40:03 +08:00
世界 4fb227ed86 Fix payload not return to pool 2023-09-24 14:40:03 +08:00
世界 8ea7f0ab45 Fix dns log 2023-09-24 12:38:33 +08:00
世界 5a1ddea100 Fix dns log 2023-09-24 12:38:33 +08:00
世界 4ed6e10359 Fix merge command 2023-09-24 12:12:35 +08:00
世界 fbaa2f9de9 Fix merge command 2023-09-24 12:12:35 +08:00
世界 b4e6eb83a3 Fix shadow-tls user context 2023-09-24 12:12:35 +08:00
世界 97ab9bb194 Fix shadow-tls user context 2023-09-24 12:12:35 +08:00
世界 a43985188b Improve URLTest delay calculate 2023-09-23 20:27:43 +08:00
世界 61ac141124 Improve URLTest delay calculate 2023-09-23 20:27:43 +08:00
世界 c451b23fb5 Fix ACME DNS01 DNS challenge 2023-09-23 20:26:46 +08:00
世界 d4d49d9df5 Fix ACME DNS01 DNS challenge 2023-09-23 20:26:46 +08:00
世界 e94a1829fa Fix missing context in geo resources download 2023-09-23 20:26:46 +08:00
世界 c60a944aac Fix missing context in geo resources download 2023-09-23 20:26:46 +08:00
世界 acf14fd2ca documentation: Bump version 2023-09-22 12:08:09 +08:00
世界 17584c245f documentation: Bump version 2023-09-22 12:08:09 +08:00
世界 6f3f822f32 Minor fixes 2023-09-22 12:07:39 +08:00
世界 6e84b694a4 Minor fixes 2023-09-22 12:07:39 +08:00
世界 9454f1fd57 Update dependencies 2023-09-20 22:20:40 +08:00
世界 34a93171f0 Update dependencies 2023-09-20 22:20:40 +08:00
世界 25b83fd0d9 Fix debug.SetMemoryLimit usage 2023-09-20 22:01:58 +08:00
世界 678f6ef72f Fix debug.SetMemoryLimit usage 2023-09-20 22:01:58 +08:00
世界 387f388bde documentation: Bump version 2023-09-20 14:15:54 +08:00
世界 ae8187ed15 documentation: Bump version 2023-09-20 14:15:54 +08:00
世界 3ff95715f6 Improve conntrack 2023-09-20 14:15:00 +08:00
世界 12dd1ac87f Improve conntrack 2023-09-20 14:15:00 +08:00
世界 7934f362e5 documentation: Bump version 2023-09-19 19:59:29 +08:00
世界 85c8f00885 documentation: Bump version 2023-09-19 19:59:29 +08:00
世界 7945f564c4 Add merge command 2023-09-19 19:59:07 +08:00
世界 e7b7ae811f Add merge command 2023-09-19 19:59:07 +08:00
世界 5975236b94 Don't return success as an error when the lookup result is empty 2023-09-19 19:05:23 +08:00
世界 a9743b77f6 Don't return success as an error when the lookup result is empty 2023-09-19 19:05:23 +08:00
世界 3444828163 Update quic-go 2023-09-19 18:33:44 +08:00
世界 4068871d97 Update quic-go 2023-09-19 18:33:44 +08:00
世界 b67cdb80da Update dependencies 2023-09-19 18:33:06 +08:00
世界 f05afcea39 Update dependencies 2023-09-19 18:33:06 +08:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3c569faf1e [dependencies] Update github-actions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-17 13:12:03 +08:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
688e9daef4 [dependencies] Update github-actions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-17 13:12:03 +08:00
世界 28de09812a Bump version 2023-09-17 01:09:48 +08:00
世界 64edacffb7 Bump version 2023-09-17 01:09:48 +08:00
世界 87a522d0d9 Fix hysteria2 mbps calculation 2023-09-17 01:09:48 +08:00
世界 743df5373b Fix hysteria2 mbps calculation 2023-09-17 01:09:48 +08:00
世界 54ede6788c Fix panic on create system proxy failed 2023-09-17 01:09:41 +08:00
世界 e80084316d Fix panic on create system proxy failed 2023-09-17 01:09:41 +08:00
世界 635ced0fbb Fix v2ray websocket transport 2023-09-17 01:09:41 +08:00
世界 9dcd427743 Fix v2ray websocket transport 2023-09-17 01:09:41 +08:00
世界 0c19f8308c Add ACME DNS01 challenge support via libdns 2023-09-17 01:09:41 +08:00
世界 d17e93384b Add ACME DNS01 challenge support via libdns 2023-09-17 01:09:41 +08:00
世界 7cdee741b3 Fix test 2023-09-16 23:45:47 +08:00
世界 c1ffcf365e Fix test 2023-09-16 23:45:47 +08:00
世界 b77d3950ed Fix gomobile build on macOS 2023-09-16 00:09:45 +08:00
世界 3040e97222 Fix gomobile build on macOS 2023-09-16 00:09:45 +08:00
世界 67b0405949 Update Makefile 2023-09-16 00:09:41 +08:00
世界 5f063fb0b5 Update Makefile 2023-09-16 00:09:41 +08:00
世界 3e765439b2 documentation: Update Clash default_mode description 2023-09-16 00:09:41 +08:00
世界 a7dadd8671 documentation: Update Clash default_mode description 2023-09-16 00:09:41 +08:00
世界 837abfbb9a Add interrupt support for outbound groups 2023-09-16 00:09:41 +08:00
世界 c320be75a7 Add interrupt support for outbound groups 2023-09-16 00:09:41 +08:00
世界 0629ded2f8 Migrate QUIC wrapper and protocol implementations to library 2023-09-16 00:09:41 +08:00
世界 bd7adcbb7e Migrate QUIC wrapper and protocol implementations to library 2023-09-16 00:09:41 +08:00
世界 8e54cd3b07 documentation: Update changelog for stable versions 2023-09-15 17:34:39 +08:00
世界 1d6d3edec5 documentation: Update changelog for stable versions 2023-09-15 17:34:39 +08:00
世界 e4dd887b3a documentation: Bump version 2023-09-12 15:57:33 +08:00
世界 46bfeb574c documentation: Bump version 2023-09-12 15:57:33 +08:00
世界 17a12881e2 Mark deprecated features 2023-09-12 13:26:23 +08:00
世界 a1449ee40e Mark deprecated features 2023-09-12 13:26:23 +08:00
世界 865b1cc1ca documentation: Add hysteria2 2023-09-12 13:26:22 +08:00
世界 8cb41b5fa6 documentation: Add hysteria2 2023-09-12 13:26:22 +08:00
世界 465c8ffb8f Add hysteria2 protocol 2023-09-12 13:26:21 +08:00
世界 53475c7390 Add hysteria2 protocol 2023-09-12 13:26:21 +08:00
世界 e5a704d4b7 Improve system proxy API 2023-09-12 13:26:21 +08:00
世界 5d8af150a7 Improve system proxy API 2023-09-12 13:26:21 +08:00
013e29e4b6 Add KDE set system proxy support
Co-authored-by: Hiddify <114227601+hiddify1@users.noreply.github.com>
2023-09-12 13:26:20 +08:00
69499a51a5 Add KDE set system proxy support
Co-authored-by: Hiddify <114227601+hiddify1@users.noreply.github.com>
2023-09-12 13:26:20 +08:00
世界 928cccc285 Add ECH support for QUIC based protocols 2023-09-12 13:26:20 +08:00
世界 4c050d7f4b Add ECH support for QUIC based protocols 2023-09-12 13:26:20 +08:00
世界 7d7d49d314 documentation: Update TLS ECH struct 2023-09-12 13:26:20 +08:00
世界 533fca9fa3 documentation: Update TLS ECH struct 2023-09-12 13:26:20 +08:00
世界 1e53ed245d Enable with_ech by default 2023-09-12 13:26:19 +08:00
世界 187bf2f7bc Enable with_ech by default 2023-09-12 13:26:19 +08:00
世界 952a11f402 Add ECH keypair generator 2023-09-12 13:26:19 +08:00
世界 983a4222ad Add ECH keypair generator 2023-09-12 13:26:19 +08:00
世界 86a5d8f8d3 Remove legacy NTP usages 2023-09-12 13:26:19 +08:00
世界 2ea506aeb8 Remove legacy NTP usages 2023-09-12 13:26:19 +08:00
世界 8c13195b9d Improve ECH support 2023-09-12 13:26:19 +08:00
世界 5b343d4c72 Improve ECH support 2023-09-12 13:26:19 +08:00
世界 d7b6e551e2 Fix SOCKS outbound 2023-09-12 13:26:03 +08:00
世界 be61ca64d4 Fix SOCKS outbound 2023-09-12 13:26:03 +08:00
世界 5518e5f7c2 Fix QUIC DNS 2023-09-12 13:14:21 +08:00
世界 efe33cf48d Fix QUIC DNS 2023-09-12 13:14:21 +08:00
世界 04fe6c6035 Fix TFO async write 2023-09-09 19:52:13 +08:00
世界 fe8d46cce5 Fix TFO async write 2023-09-09 19:52:13 +08:00
世界 78ad0ed9d8 Fix TUIC context 2023-09-09 11:41:04 +08:00
世界 b1f289bce5 Fix TUIC context 2023-09-09 11:41:04 +08:00
世界 409acf0634 Update Makefile 2023-09-07 22:37:55 +08:00
世界 a8beb80876 Update Makefile 2023-09-07 22:37:55 +08:00
世界 3cfedd9f7e Fix QUIC defragger 2023-09-07 21:35:25 +08:00
世界 ff209471d8 Fix QUIC defragger 2023-09-07 21:35:25 +08:00
unknownand世界 d31755a4de Fix QUIC stream usage 2023-09-07 21:34:36 +08:00
unknownand世界 806f7d0a2b Fix QUIC stream usage 2023-09-07 21:34:36 +08:00
世界 f4a0b628f7 Reject invalid connection 2023-09-07 21:34:36 +08:00
世界 6b943caf37 Reject invalid connection 2023-09-07 21:34:36 +08:00
世界 72a74bded4 Fix router close 2023-09-07 21:34:35 +08:00
世界 4ea2d460f4 Fix router close 2023-09-07 21:34:35 +08:00
世界 78c1b0ba16 platform: Fix crash on android 2023-09-07 21:34:35 +08:00
世界 c84c18f960 platform: Fix crash on android 2023-09-07 21:34:35 +08:00
世界 e6083d8167 Fix connect domain for IP outbounds 2023-09-07 21:34:35 +08:00
世界 1402bdab41 Fix connect domain for IP outbounds 2023-09-07 21:34:35 +08:00
renovate[bot]and世界 90bb02b9d9 [dependencies] Update actions/checkout action to v4 2023-09-07 21:34:35 +08:00
renovate[bot]and世界 7082cf277e [dependencies] Update actions/checkout action to v4 2023-09-07 21:34:35 +08:00
世界 58c449c50c clash-api: Move default mode to first 2023-09-07 21:34:35 +08:00
世界 b9310154a7 clash-api: Move default mode to first 2023-09-07 21:34:35 +08:00
世界 70dfc52753 platform: Improve client 2023-09-07 21:34:35 +08:00
世界 55c34e3fb0 platform: Improve client 2023-09-07 21:34:35 +08:00
世界 a3b7a403b7 documentation: Bump version 2023-08-31 23:32:44 +08:00
世界 68f2202eec documentation: Bump version 2023-08-31 23:32:44 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
78e913477d [dependencies] Update actions/stale action to v8
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-31 23:32:44 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
5057e50bb8 [dependencies] Update actions/stale action to v8
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-31 23:32:44 +08:00
世界 9542c19291 Update Makefile 2023-08-31 23:32:44 +08:00
世界 23e1a69955 Update Makefile 2023-08-31 23:32:44 +08:00
世界 219e987d5b Fix return nil addr in conn 2023-08-30 21:28:03 +08:00
世界 b83c6c9d20 Fix return nil addr in conn 2023-08-30 21:28:03 +08:00
世界 f66b53d4f5 Fix hysteria packet write 2023-08-30 18:23:17 +08:00
世界 67deac6d44 Fix hysteria packet write 2023-08-30 18:23:17 +08:00
世界 c92345046d Update Makefile 2023-08-30 18:23:17 +08:00
世界 ea3731162b Update Makefile 2023-08-30 18:23:17 +08:00
世界 17c1a0f671 documentation: Update changelog 2023-08-29 10:26:11 +08:00
世界 c75e32e722 documentation: Update changelog 2023-08-29 10:26:11 +08:00
世界 4f5283e401 Update Makefile 2023-08-29 10:26:11 +08:00
世界 e7b35be5f6 Update Makefile 2023-08-29 10:26:11 +08:00
世界 75c382d36e Fix TUIC client 2023-08-28 19:58:02 +08:00
世界 5a309266f0 Fix TUIC client 2023-08-28 19:58:02 +08:00
世界 ecd5166fb6 documentation: Update changelog 2023-08-25 20:33:16 +08:00
世界 05669eaaad documentation: Update changelog 2023-08-25 20:33:16 +08:00
世界 840e770de3 Update dependencies 2023-08-25 20:21:14 +08:00
世界 e91a6e5439 Update dependencies 2023-08-25 20:21:14 +08:00
世界 129e10b7a5 Add store_mode and platform Clash mode selector 2023-08-25 20:21:14 +08:00
世界 43f72a6419 Add store_mode and platform Clash mode selector 2023-08-25 20:21:14 +08:00
世界 eded1f211f Fix sniffer 2023-08-24 21:53:06 +08:00
世界 6dcacf3b5e Fix sniffer 2023-08-24 21:53:06 +08:00
世界 6f3fee3f78 Update dependencies 2023-08-24 11:31:29 +08:00
世界 edad4d1ce7 Update dependencies 2023-08-24 11:31:29 +08:00
世界 1fe88318d2 Fix test 2023-08-22 11:22:13 +08:00
世界 262842c87d Fix test 2023-08-22 11:22:13 +08:00
世界 a49566b2b8 documentation: Bump version 2023-08-21 18:24:31 +08:00
世界 376f527742 documentation: Bump version 2023-08-21 18:24:31 +08:00
世界 7df32e3079 Fix TUIC UDP 2023-08-21 18:16:38 +08:00
世界 c0bbb3849d Fix TUIC UDP 2023-08-21 18:16:38 +08:00
世界 695e6e482b Fix Makefile 2023-08-21 18:14:27 +08:00
世界 738c25d818 Fix Makefile 2023-08-21 18:14:27 +08:00
dyhkwongandGitHub b7104b6da8 Fix SOCKS5 UDP sniffing accidentially enabled 2023-08-20 19:06:37 +08:00
dyhkwongandGitHub 027af4d4ee Fix SOCKS5 UDP sniffing accidentially enabled 2023-08-20 19:06:37 +08:00
世界 e40eb781b8 Remove bad scripts 2023-08-20 17:57:39 +08:00
世界 6011f4483a Remove bad scripts 2023-08-20 17:57:39 +08:00
世界 2ce3513853 documentation: Bump version 2023-08-20 17:29:22 +08:00
世界 fc22466e3b documentation: Bump version 2023-08-20 17:29:22 +08:00
世界 149df244dc Add [include/exclude]_interface iproute2 options 2023-08-20 17:29:22 +08:00
世界 975e13a313 Add [include/exclude]_interface iproute2 options 2023-08-20 17:29:22 +08:00
世界 a89eeaa3f3 Add udp over stream support for TUIC 2023-08-20 14:15:22 +08:00
世界 f46732bc0e Add udp over stream support for TUIC 2023-08-20 14:15:22 +08:00
世界 2f1fdea586 Update tfo-go 2023-08-20 13:32:07 +08:00
世界 5c5c25e3ad Update tfo-go 2023-08-20 13:32:07 +08:00
世界 5a36f9cfad minor: Remove unused parameter 2023-08-20 13:32:07 +08:00
世界 53a0bf2d11 minor: Remove unused parameter 2023-08-20 13:32:07 +08:00
renovate[bot]and世界 deec0c20e7 [dependencies] Update golang Docker tag to v1.21 2023-08-20 13:31:56 +08:00
renovate[bot]and世界 7b79d98f59 [dependencies] Update golang Docker tag to v1.21 2023-08-20 13:31:56 +08:00
世界 360d77da79 Fix UDP route 2023-08-20 13:31:55 +08:00
世界 1dd2c26f31 Fix UDP route 2023-08-20 13:31:55 +08:00
armv9and世界 23b9d066e8 Fix process search with fakeip 2023-08-20 13:31:55 +08:00
armv9and世界 d14170348d Fix process search with fakeip 2023-08-20 13:31:55 +08:00
世界 a493925068 platform: Add group expand status 2023-08-20 13:31:55 +08:00
世界 9f94b21687 platform: Add group expand status 2023-08-20 13:31:55 +08:00
世界 159c6f152b Add new issue template 2023-08-20 13:31:49 +08:00
世界 cf57e46d69 Add new issue template 2023-08-20 13:31:49 +08:00
世界 898938d70c Update documentation 2023-08-20 13:31:48 +08:00
世界 b459001600 Update documentation 2023-08-20 13:31:48 +08:00
世界 ace44738fd Fix ci build 2023-08-20 13:31:48 +08:00
世界 73267fd6ad Fix ci build 2023-08-20 13:31:48 +08:00
世界 5717fb47eb Add TCP MultiPath support 2023-08-20 13:31:48 +08:00
世界 1019ecfdcf Add TCP MultiPath support 2023-08-20 13:31:48 +08:00
世界 82e876fd24 Pause recurring tasks when no network 2023-08-20 13:31:48 +08:00
世界 81b847faca Pause recurring tasks when no network 2023-08-20 13:31:48 +08:00
世界 9e597de6a8 documentation: Add TUIC 2023-08-20 13:31:47 +08:00
世界 ce4c76cdd2 documentation: Add TUIC 2023-08-20 13:31:47 +08:00
世界 3841bacc68 Add TUIC protocol 2023-08-20 13:31:40 +08:00
世界 917420e79a Add TUIC protocol 2023-08-20 13:31:40 +08:00
世界 18cedcb256 Update quic-go 2023-08-20 13:31:40 +08:00
世界 0b14dc3228 Update quic-go 2023-08-20 13:31:40 +08:00
世界 89ee8fa705 Update dependencies 2023-08-20 13:31:36 +08:00
世界 cbdaf3272b Update dependencies 2023-08-20 13:31:36 +08:00
世界 ba4e15a58d Fix missing HandshakeConn interface 2023-08-20 13:31:31 +08:00
世界 d51ab2b0a7 Fix missing HandshakeConn interface 2023-08-20 13:31:31 +08:00
世界 5d7471191a platform: Enable Clash API support by default 2023-08-20 13:31:29 +08:00
世界 1363e16312 platform: Enable Clash API support by default 2023-08-20 13:31:29 +08:00
世界 5ac514702b Save fakeip metadata immediately 2023-08-20 13:31:27 +08:00
世界 f43d0141f3 Save fakeip metadata immediately 2023-08-20 13:31:27 +08:00
世界 4f847ab87d Fix network monitor 2023-08-20 13:30:50 +08:00
世界 90b3aad83a Fix network monitor 2023-08-20 13:30:50 +08:00
世界 0cbfc59b37 Fix tag detect 2023-08-07 22:07:24 +08:00
世界 2675aff98a Fix tag detect 2023-08-07 22:07:24 +08:00
世界 ca63010a33 documentation: Update changelog 2023-08-05 21:37:08 +08:00
世界 09ffa2c66e documentation: Update changelog 2023-08-05 21:37:08 +08:00
世界 aff1d8b0ea Update dependencies 2023-08-05 21:37:08 +08:00
世界 9fba4f02b6 Update dependencies 2023-08-05 21:37:08 +08:00
世界 397bc8a736 platform: Improve status 2023-08-04 21:10:32 +08:00
世界 59987747e5 platform: Improve status 2023-08-04 21:10:32 +08:00
世界 ce8fce22a2 Fix UDP async write 2023-08-04 12:38:51 +08:00
世界 c40140bbae Fix UDP async write 2023-08-04 12:38:51 +08:00
世界 001f417eac Fix http proxy server again 2023-08-04 12:38:51 +08:00
世界 2123b216c0 Fix http proxy server again 2023-08-04 12:38:51 +08:00
世界 177f63f768 platform: Add sleep support for NetworkExtension 2023-08-04 12:38:51 +08:00
世界 1983f54907 platform: Add sleep support for NetworkExtension 2023-08-04 12:38:51 +08:00
世界 8b8208f165 documentation: Update changelog 2023-07-31 09:49:07 +08:00
世界 8d629ef323 documentation: Update changelog 2023-07-31 09:49:07 +08:00
世界 fc4908a94b Update quic-go 2023-07-31 09:49:07 +08:00
世界 f57bee2f4b Update quic-go 2023-07-31 09:49:07 +08:00
世界 e5542643f8 Update dependencies 2023-07-31 09:07:32 +08:00
世界 679739683e Update dependencies 2023-07-31 09:07:32 +08:00
世界 9bb6af5fbb Fix http proxy server 2023-07-31 09:04:55 +08:00
世界 4fcce1f073 Fix http proxy server 2023-07-31 09:04:55 +08:00
世界 2df424a532 platform: Update profile binary format 2023-07-30 20:55:27 +08:00
世界 ff14220e08 platform: Update profile binary format 2023-07-30 20:55:27 +08:00
世界 0095c5b560 documentation:Add tvOS page 2023-07-29 21:09:15 +08:00
世界 a7b7a5c3c5 documentation:Add tvOS page 2023-07-29 21:09:15 +08:00
世界 145a540872 platform: Add support for tvOS 2023-07-29 21:01:43 +08:00
世界 b054441f34 platform: Add support for tvOS 2023-07-29 21:01:43 +08:00
世界 59411282ee documentation: Update installation 2023-07-29 21:01:43 +08:00
世界 1e31d26e03 documentation: Update installation 2023-07-29 21:01:43 +08:00
世界 4cc2d3d965 documentation: Update changelog 2023-07-25 13:21:15 +08:00
世界 ffe515d0e0 documentation: Update changelog 2023-07-25 13:21:15 +08:00
世界 b5e6d21193 Fix gVisor UDP 2023-07-25 08:28:24 +08:00
世界 aad021f521 Fix gVisor UDP 2023-07-25 08:28:24 +08:00
世界 fb7ca5dbf1 documentation: Update changelog 2023-07-24 17:56:39 +08:00
世界 4a986459ee documentation: Update changelog 2023-07-24 17:56:39 +08:00
世界 f9e20336e0 Fix cache file 2023-07-24 16:51:03 +08:00
世界 9532d0cba4 Fix cache file 2023-07-24 16:51:03 +08:00
世界 9da6815a95 Add support for macOS system extension 2023-07-24 16:51:03 +08:00
世界 cadc34f3ad Add support for macOS system extension 2023-07-24 16:51:03 +08:00
世界 77b6b371f4 Update dependencies 2023-07-23 14:23:51 +08:00
世界 db23a48b36 Update dependencies 2023-07-23 14:23:51 +08:00
世界 12d51edfdb Fix certmagic usage 2023-07-20 20:03:20 +08:00
世界 407cf68e59 Fix certmagic usage 2023-07-20 20:03:20 +08:00
世界 e110328ffd Fix fakeip unsaved state 2023-07-20 19:59:04 +08:00
世界 e0058ca9c5 Fix fakeip unsaved state 2023-07-20 19:59:04 +08:00
世界 3dc6974a17 Fix download geo resources 2023-07-20 19:41:22 +08:00
世界 8140af01aa Fix download geo resources 2023-07-20 19:41:22 +08:00
世界 f8662a8d63 Fix cache file 2023-07-20 19:41:22 +08:00
世界 98bf696d01 Fix cache file 2023-07-20 19:41:22 +08:00
世界 557ab5cc2a Update changelog 2023-07-19 14:59:30 +08:00
世界 e075bb5c8d Update changelog 2023-07-19 14:59:30 +08:00
世界 8b329792fb Update dependencies 2023-07-19 14:45:30 +08:00
世界 c6baabedef Update dependencies 2023-07-19 14:45:30 +08:00
世界 08481d4ecb Improve platform status 2023-07-16 14:08:45 +08:00
世界 6e6998dab7 Improve platform status 2023-07-16 14:08:45 +08:00
世界 f9ebe73e60 documentation: Update changelog 2023-07-15 14:53:48 +08:00
世界 1a29c23263 documentation: Update changelog 2023-07-15 14:53:48 +08:00
世界 4b08787e19 Fix abx reader for some malformed formats 2023-07-15 14:46:15 +08:00
世界 0f87396ab6 Fix abx reader for some malformed formats 2023-07-15 14:46:15 +08:00
世界 a64a4ecaaf Update support page 2023-07-15 14:46:09 +08:00
世界 ffde948860 Update support page 2023-07-15 14:46:09 +08:00
世界 5e33782cfd Build memory limiter for android 2023-07-15 14:46:06 +08:00
世界 69b5dbdcc3 Build memory limiter for android 2023-07-15 14:46:06 +08:00
世界 50d56d3f26 Fix hysteria inbound context 2023-07-11 20:58:20 +08:00
世界 1121517755 Fix hysteria inbound context 2023-07-11 20:58:20 +08:00
世界 3b34f63e03 Fix test 2023-07-11 15:44:03 +08:00
世界 6879def619 Fix test 2023-07-11 15:44:03 +08:00
世界 a88060a0ab Fix vmess legacy server 2023-07-11 15:44:03 +08:00
世界 5c0f6d0a6f Fix vmess legacy server 2023-07-11 15:44:03 +08:00
世界 5ddf038f55 Fix v2ray websocket transport 2023-07-11 15:44:03 +08:00
世界 d74abbd20e Fix v2ray websocket transport 2023-07-11 15:44:03 +08:00
世界 f9902c3f1d Fix fakeip lookup 2023-07-11 15:44:02 +08:00
世界 120dae4eed Fix fakeip lookup 2023-07-11 15:44:02 +08:00
世界 70f1de128f platform: Fix output format 2023-07-09 12:24:43 +08:00
世界 bb651db2d2 platform: Fix output format 2023-07-09 12:24:43 +08:00
世界 18b46a6d8c documentation: Update changelog 2023-07-09 07:54:08 +08:00
世界 e929dde13e documentation: Update changelog 2023-07-09 07:54:08 +08:00
世界 e8b5988cec Fix async FakeIP save 2023-07-08 16:21:11 +08:00
世界 9d75385bbb Fix async FakeIP save 2023-07-08 16:21:11 +08:00
世界 9eeedf78ed Update dependencies 2023-07-08 16:19:28 +08:00
世界 1c526feec1 Update dependencies 2023-07-08 16:19:28 +08:00
世界 60bf3714c7 documentation: Update changelog 2023-07-07 14:23:45 +08:00
世界 7df26986de documentation: Update changelog 2023-07-07 14:23:45 +08:00
世界 e2473c1ebd Fix multi error 2023-07-07 13:57:28 +08:00
世界 5f2d23a12d Fix multi error 2023-07-07 13:57:28 +08:00
世界 e66199f5dd Fix syscall copy packet 2023-07-07 13:42:42 +08:00
世界 d9e65c0969 Fix syscall copy packet 2023-07-07 13:42:42 +08:00
世界 a828742bef Fix save FakeIP cache 2023-07-07 12:51:38 +08:00
世界 ec1160924f Fix save FakeIP cache 2023-07-07 12:51:38 +08:00
世界 d4b6766e4e Fix close quic.Listener 2023-07-07 12:43:22 +08:00
世界 230e8f895d Fix close quic.Listener 2023-07-07 12:43:22 +08:00
世界 17cc9cba83 Update dependencies 2023-07-03 21:47:32 +08:00
世界 af79378734 Update dependencies 2023-07-03 21:47:32 +08:00
世界 7e5d4943b2 Remove stack buffer usage 2023-07-03 21:45:32 +08:00
世界 07ce5e0d22 Remove stack buffer usage 2023-07-03 21:45:32 +08:00
世界 2c31aec4d7 platform: Add group interface 2023-07-02 18:46:41 +08:00
世界 9c8565cf21 platform: Add group interface 2023-07-02 18:46:41 +08:00
世界 5f144b6c4e Try fix StreamDomainNameQuery 2023-07-02 16:38:38 +08:00
世界 5ad0ea2b5a Try fix StreamDomainNameQuery 2023-07-02 16:38:38 +08:00
世界 dc4edea2a5 documentation: Update changelog 2023-06-27 11:31:24 +08:00
世界 e482053c8a documentation: Update changelog 2023-06-27 11:31:24 +08:00
世界 41c4e40856 Update dependencies 2023-06-27 11:13:30 +08:00
世界 945713d886 Update dependencies 2023-06-27 11:13:30 +08:00
世界 4f0351eceb Check duplicated outbound tag 2023-06-26 18:47:52 +08:00
世界 9bb62ad6b5 Check duplicated outbound tag 2023-06-26 18:47:52 +08:00
世界 edd9a799ce Fix DNS rewrite_ttl logic 2023-06-23 16:12:25 +08:00
世界 c2bda9fbde Fix DNS rewrite_ttl logic 2023-06-23 16:12:25 +08:00
世界 9053c6aca9 Prevent write packet IPv6 packet to tun IPv4 connection 2023-06-21 13:29:24 +08:00
世界 1d1db62a44 Prevent write packet IPv6 packet to tun IPv4 connection 2023-06-21 13:29:24 +08:00
世界 3861985c9f documentation: Update changelog 2023-06-19 14:11:41 +08:00
世界 39405373f8 documentation: Update changelog 2023-06-19 14:11:41 +08:00
世界 52ba94c6ef Update dependencies 2023-06-19 14:11:41 +08:00
世界 22a7988d3f Update dependencies 2023-06-19 14:11:41 +08:00
世界 02c32fd223 Fix ios build
Cannot use errno as method and variable due to conflict with objc
2023-06-19 14:11:40 +08:00
世界 b2092fafb7 Fix ios build
Cannot use errno as method and variable due to conflict with objc
2023-06-19 14:11:40 +08:00
世界 82d5b9e36d Unwrap 4in6 address received by client packet conn 2023-06-19 13:29:41 +08:00
世界 cc7b5d8280 Unwrap 4in6 address received by client packet conn 2023-06-19 13:29:41 +08:00
世界 05331b2409 platform: Improve local DNS transport 2023-06-18 10:00:32 +08:00
世界 702d96a738 platform: Improve local DNS transport 2023-06-18 10:00:32 +08:00
世界 56d232aee0 documentation: Update changelog 2023-06-17 12:21:18 +08:00
世界 b9f34f1309 documentation: Update changelog 2023-06-17 12:21:18 +08:00
世界 ed07c3a64b Update dependencies 2023-06-17 12:17:43 +08:00
世界 07724a0ddd Update dependencies 2023-06-17 12:17:43 +08:00
世界 0e1f29d790 Update quic-go 2023-06-15 14:52:25 +08:00
世界 83c3454685 Update quic-go 2023-06-15 14:52:25 +08:00
世界 080eb5b5dc documentation: Update changelog 2023-06-14 16:28:44 +08:00
世界 7d263eb733 documentation: Update changelog 2023-06-14 16:28:44 +08:00
世界 1e0ce10ca2 Update goreleaser usage 2023-06-14 09:39:13 +08:00
世界 222687d9c5 Update goreleaser usage 2023-06-14 09:39:13 +08:00
世界 0ff98ebe1a Build with_dhcp by default 2023-06-14 09:14:45 +08:00
世界 07d3652e30 Build with_dhcp by default 2023-06-14 09:14:45 +08:00
世界 079602e912 Fix outbound start sequence 2023-06-13 22:38:05 +08:00
世界 8d5b9d240a Fix outbound start sequence 2023-06-13 22:38:05 +08:00
世界 4b0e7583fb Fix hysteria outbound 2023-06-13 21:41:33 +08:00
世界 4f12eba944 Fix hysteria outbound 2023-06-13 21:41:33 +08:00
世界 c594156ee7 Update documentation 2023-06-11 22:38:37 +08:00
世界 a7f77d59c1 Update documentation 2023-06-11 22:38:37 +08:00
shadow750d6and世界 fdd2737f78 Reconnect once if hysteria request fails
This allows graceful recovery when network isn't good enough.

[Original hysteria source
code](https://github.com/apernet/hysteria/blob/13d46da99876c2c9feb1083ff5f2da201d9d0a1e/core/cs/client.go#L182)
has similar mechanism.
2023-06-11 22:21:32 +08:00
shadow750d6and世界 597248130f Reconnect once if hysteria request fails
This allows graceful recovery when network isn't good enough.

[Original hysteria source
code](https://github.com/apernet/hysteria/blob/13d46da99876c2c9feb1083ff5f2da201d9d0a1e/core/cs/client.go#L182)
has similar mechanism.
2023-06-11 22:21:32 +08:00
世界 1d82ae3ce2 Migrate gVisor to fork 2023-06-11 22:07:36 +08:00
世界 3c2c9cf317 Migrate gVisor to fork 2023-06-11 22:07:36 +08:00
世界 3890dca4c9 Update dependencies 2023-06-11 20:58:59 +08:00
世界 e572b9d0cd Update dependencies 2023-06-11 20:58:59 +08:00
世界 1968ddb0c1 Fix fakeip routing 2023-06-11 20:58:59 +08:00
世界 52e9059a8d Fix fakeip routing 2023-06-11 20:58:59 +08:00
世界 a9a2fec766 Fix shadowsocks none client 2023-06-08 10:23:39 +08:00
世界 0cb9cff690 Fix shadowsocks none client 2023-06-08 10:23:39 +08:00
世界 57cc7225e6 Fix TLS 1.2 support for shadow-tls client 2023-06-07 21:03:39 +08:00
世界 c0669cb2a5 Fix TLS 1.2 support for shadow-tls client 2023-06-07 21:03:39 +08:00
世界 84e8c3ebb5 Fix using v2ray websocket transport with detour 2023-06-07 21:03:21 +08:00
世界 c5902f2473 Fix using v2ray websocket transport with detour 2023-06-07 21:03:21 +08:00
世界 e640b14f5b Improve read waiter interface 2023-06-07 21:03:11 +08:00
世界 22028602e8 Improve read waiter interface 2023-06-07 21:03:11 +08:00
世界 e94e768c4f Fix DNS outbound 2023-06-07 21:03:08 +08:00
世界 bd54608473 Fix DNS outbound 2023-06-07 21:03:08 +08:00
世界 79b2cf7992 Add cache_id option for Clash cache file 2023-06-07 21:03:06 +08:00
世界 3741394269 Add cache_id option for Clash cache file 2023-06-07 21:03:06 +08:00
世界 2b3983a6b3 Fix shadowsocks AEAD UDP server 2023-06-07 21:02:52 +08:00
世界 6266d2df7e Fix shadowsocks AEAD UDP server 2023-06-07 21:02:52 +08:00
世界 564c0e97b9 Use API to create windows firewall rule 2023-06-07 21:01:29 +08:00
世界 01dfba722a Use API to create windows firewall rule 2023-06-07 21:01:29 +08:00
世界 659933c742 Reimplemented shadowsocks client 2023-06-07 20:57:07 +08:00
世界 f8d5f01665 Reimplemented shadowsocks client 2023-06-07 20:57:07 +08:00
Hellojackand世界 333f0999fd Fix UVariantLen usage 2023-06-07 20:56:57 +08:00
Hellojackand世界 ad999d4791 Fix UVariantLen usage 2023-06-07 20:56:57 +08:00
世界 d87d142798 Improve DNS caching 2023-06-07 20:56:55 +08:00
世界 6f1b258501 Improve DNS caching 2023-06-07 20:56:55 +08:00
世界 c8b2c24d35 Set TCP keepalive for WireGuard gVisor TCP connections 2023-06-07 20:53:26 +08:00
世界 f949ddc0ab Set TCP keepalive for WireGuard gVisor TCP connections 2023-06-07 20:53:26 +08:00
Weltolkand世界 7791a4c7f2 documentation: Fix fakeip link broken 2023-06-07 20:53:13 +08:00
Weltolkand世界 f53007cbf3 documentation: Fix fakeip link broken 2023-06-07 20:53:13 +08:00
世界 e2d199f28d Improve direct copy 2023-06-07 20:53:00 +08:00
世界 c287731df9 Improve direct copy 2023-06-07 20:53:00 +08:00
世界 c18a74a006 Improve multiplex 2023-06-07 20:46:34 +08:00
世界 bc32c78d03 Improve multiplex 2023-06-07 20:46:34 +08:00
世界 d21b521e33 clash-api: Reset outbounds in DELETE /connections 2023-06-07 20:45:39 +08:00
世界 daee0db7bb clash-api: Reset outbounds in DELETE /connections 2023-06-07 20:45:39 +08:00
世界 5331912622 Add multiplexer for VLESS outbound 2023-06-07 20:45:39 +08:00
世界 91fbf4c79b Add multiplexer for VLESS outbound 2023-06-07 20:45:39 +08:00
世界 46c0012c83 Update gVisor to 20230417.0 2023-06-07 20:45:25 +08:00
世界 54d9ef2f2a Update gVisor to 20230417.0 2023-06-07 20:45:25 +08:00
世界 d84893af34 Add debug http server 2023-06-07 20:45:25 +08:00
世界 e056d4502b Add debug http server 2023-06-07 20:45:25 +08:00
世界 e35d48c076 Add filemanager api 2023-06-07 20:45:25 +08:00
世界 98c2c439aa Add filemanager api 2023-06-07 20:45:25 +08:00
世界 fc0ac03d5d Update wireguard-go 2023-06-07 20:38:30 +08:00
世界 b6068cea6b Update wireguard-go 2023-06-07 20:38:30 +08:00
世界 9e515ef8de Ignore system tun stack bind interface error 2023-06-07 20:35:02 +08:00
世界 9c9affa719 Ignore system tun stack bind interface error 2023-06-07 20:35:02 +08:00
世界 385a561b2d Improve VLESS request 2023-06-07 20:35:00 +08:00
世界 8eb7dd0059 Improve VLESS request 2023-06-07 20:35:00 +08:00
世界 59faaf8f63 Add deadline interface 2023-06-07 20:34:56 +08:00
世界 a62ad44883 Add deadline interface 2023-06-07 20:34:56 +08:00
世界 4733233c0b shadowsocks: Multi-user support for legacy AEAD inbound
Signed-off-by: wwqgtxx <wwqgtxx@gmail.com>
2023-06-07 20:34:54 +08:00
世界 2850354070 shadowsocks: Multi-user support for legacy AEAD inbound
Signed-off-by: wwqgtxx <wwqgtxx@gmail.com>
2023-06-07 20:34:54 +08:00
世界 15df7722ea Add headers option for HTTP outbound 2023-06-07 20:34:52 +08:00
世界 0a4abcbbc8 Add headers option for HTTP outbound 2023-06-07 20:34:52 +08:00
世界 b2bdd625ae URLTest improvements 2023-06-07 20:33:56 +08:00
世界 b491c350ae URLTest improvements 2023-06-07 20:33:56 +08:00
世界 718bf6ebab Fix wireguard reconnect 2023-06-07 20:33:53 +08:00
世界 1fbe7c54bf Fix wireguard reconnect 2023-06-07 20:33:53 +08:00
世界 aab7a18146 Use HTTPS URLTest source 2023-06-07 20:33:50 +08:00
世界 9d32fc9bd1 Use HTTPS URLTest source 2023-06-07 20:33:50 +08:00
世界 790bf27023 clash-api: Add Clash.Meta APIs 2023-06-07 20:33:41 +08:00
世界 542612129d clash-api: Add Clash.Meta APIs 2023-06-07 20:33:41 +08:00
世界 cf0d7faf15 clash api: download clash-dashboard if external-ui directory is empty 2023-06-07 20:33:06 +08:00
世界 750f87bb0a clash api: download clash-dashboard if external-ui directory is empty 2023-06-07 20:33:06 +08:00
世界 3db40a514a Add multi-peer support for wireguard outbound 2023-06-07 20:33:04 +08:00
世界 e168de79c7 Add multi-peer support for wireguard outbound 2023-06-07 20:33:04 +08:00
世界 b15d6969ff Add fakeip support 2023-06-07 20:31:26 +08:00
世界 9bca5a517f Add fakeip support 2023-06-07 20:31:26 +08:00
世界 3e6afcdcbf Refactor rules 2023-06-07 20:28:21 +08:00
世界 aa94cfb876 Refactor rules 2023-06-07 20:28:21 +08:00
世界 2500478f98 Add dns reverse mapping 2023-06-07 20:19:46 +08:00
世界 52b776b561 Add dns reverse mapping 2023-06-07 20:19:46 +08:00
世界 3b8d881bc5 documentation: Update changelog 2023-05-19 15:48:35 +08:00
世界 c74d3a53d4 documentation: Update changelog 2023-05-19 15:48:35 +08:00
世界 d70d38bd69 Update dependencies 2023-05-19 15:48:35 +08:00
世界 fe7ac80a6c Update dependencies 2023-05-19 15:48:35 +08:00
世界 b02410c191 Fix uTLS ALPN 2023-05-19 15:41:18 +08:00
世界 e50b334b9a Fix uTLS ALPN 2023-05-19 15:41:18 +08:00
XYenonand世界 5a45f92e5c Fix incorrect use of sort.Slice 2023-05-19 15:40:48 +08:00
XYenonand世界 a0d8e374fb Fix incorrect use of sort.Slice 2023-05-19 15:40:48 +08:00
Larvan2and世界 79ac74285b Enable mkdocs search in documentation
Signed-off-by: Larvan2 <78135608+Larvan2@users.noreply.github.com>
2023-05-19 15:40:42 +08:00
Larvan2and世界 d3a67cb5ae Enable mkdocs search in documentation
Signed-off-by: Larvan2 <78135608+Larvan2@users.noreply.github.com>
2023-05-19 15:40:42 +08:00
世界 4616ddf833 Fix documentation 2023-05-19 15:40:13 +08:00
世界 e69e98b185 Fix documentation 2023-05-19 15:40:13 +08:00
世界 1e93a505a4 Update badtls 2023-05-19 15:39:40 +08:00
世界 5e1499d67b Update badtls 2023-05-19 15:39:40 +08:00
世界 e8a46f8a24 Fix grpc request 2023-04-22 19:51:04 +08:00
世界 e8dad1afeb Fix grpc request 2023-04-22 19:51:04 +08:00
世界 07d4fa6ca7 documentation: Update changelog 2023-04-22 08:26:09 +08:00
世界 6ce4e31fc8 documentation: Update changelog 2023-04-22 08:26:09 +08:00
世界 2b77afc9de Revert LRU cache changes 2023-04-22 08:23:49 +08:00
世界 d2d4faf520 Revert LRU cache changes 2023-04-22 08:23:49 +08:00
世界 fa3349b737 Make v2ray http2 conn public 2023-04-22 08:14:55 +08:00
世界 438de36749 Make v2ray http2 conn public 2023-04-22 08:14:55 +08:00
世界andarmv9 20af7e8a28 Fix http response check
Co-authored-by: armv9 <48624112+arm64v8a@users.noreply.github.com>
2023-04-22 08:14:55 +08:00
世界andarmv9 df0eef770e Fix http response check
Co-authored-by: armv9 <48624112+arm64v8a@users.noreply.github.com>
2023-04-22 08:14:55 +08:00
世界andarmv9 b894afc722 Fix v2ray-plugin TLS server name
Co-authored-by: armv9 <48624112+arm64v8a@users.noreply.github.com>
2023-04-21 17:48:36 +08:00
世界andarmv9 bbdd495ed5 Fix v2ray-plugin TLS server name
Co-authored-by: armv9 <48624112+arm64v8a@users.noreply.github.com>
2023-04-21 17:48:36 +08:00
世界andarmv9 2076190634 Fix grpc lite request host
Co-authored-by: armv9 <48624112+arm64v8a@users.noreply.github.com>
2023-04-21 17:48:36 +08:00
世界andarmv9 d686172854 Fix grpc lite request host
Co-authored-by: armv9 <48624112+arm64v8a@users.noreply.github.com>
2023-04-21 17:48:36 +08:00
H1JKand世界 8f638d0e72 Add BaseContext to http servers 2023-04-21 17:48:29 +08:00
H1JKand世界 e1d96cb64e Add BaseContext to http servers 2023-04-21 17:48:29 +08:00
H1JKand世界 fbef2eac5d Fix gRPC service name escape 2023-04-21 17:48:29 +08:00
H1JKand世界 d5f94b65b7 Fix gRPC service name escape 2023-04-21 17:48:29 +08:00
Hellojackand世界 7c563c2c07 Remove TLS requirement for gRPC client 2023-04-21 17:48:29 +08:00
Hellojackand世界 ec2d0b6b3c Remove TLS requirement for gRPC client 2023-04-21 17:48:29 +08:00
世界 a7c5977db9 platform: Add UsePlatformAutoDetectInterfaceControl 2023-04-21 17:47:17 +08:00
世界 3a92bf993d platform: Add UsePlatformAutoDetectInterfaceControl 2023-04-21 17:47:17 +08:00
armv9and世界 c843eda53b Fix HTTP sniffer 2023-04-19 21:58:58 +08:00
armv9and世界 ec13965fd0 Fix HTTP sniffer 2023-04-19 21:58:58 +08:00
世界 46576eb684 Update to uuid v5 2023-04-19 21:58:58 +08:00
世界 ddf747006e Update to uuid v5 2023-04-19 21:58:58 +08:00
世界 b23baa263f Prepare deadline interface 2023-04-19 21:58:58 +08:00
世界 4382093868 Prepare deadline interface 2023-04-19 21:58:58 +08:00
世界 af6e813f78 documentation: Update client notes 2023-04-19 21:58:58 +08:00
世界 a5322850b3 documentation: Update client notes 2023-04-19 21:58:58 +08:00
世界 e0638272ed Remove legacy warnings 2023-04-19 21:58:58 +08:00
世界 407b08975c Remove legacy warnings 2023-04-19 21:58:58 +08:00
世界 8173f09018 Fix default interface monitor for darwin 2023-04-19 21:58:58 +08:00
世界 c7067ff5e8 Fix default interface monitor for darwin 2023-04-19 21:58:58 +08:00
世界 bbbe12cc54 Add udpnat test 2023-04-19 21:43:13 +08:00
世界 9b2384b296 Add udpnat test 2023-04-19 21:43:13 +08:00
世界 3627ffc27a Fix interface monitor for android 2023-04-19 21:42:40 +08:00
世界 b498a22972 Fix interface monitor for android 2023-04-19 21:42:40 +08:00
世界 be6138b6d1 Fix udp timeout 2023-04-19 21:42:10 +08:00
世界 20e9da5c67 Fix udp timeout 2023-04-19 21:42:10 +08:00
世界 ffb223bfe6 Fix platform interface monitor & Fix system tun stack for ios 2023-04-19 21:40:03 +08:00
世界 ec8974673b Fix platform interface monitor & Fix system tun stack for ios 2023-04-19 21:40:03 +08:00
世界 563059dfe5 Fix shadowsocksr build 2023-04-17 18:06:43 +08:00
世界 5e6e7923e4 Fix shadowsocksr build 2023-04-17 18:06:43 +08:00
世界 9d316ce2eb Update documentation 2023-04-16 16:28:41 +08:00
世界 de1b5971e1 Update documentation 2023-04-16 16:28:41 +08:00
世界 0482ffae1f Update dependencies 2023-04-16 16:28:41 +08:00
世界 5c20d0b4d5 Update dependencies 2023-04-16 16:28:41 +08:00
世界 e407c3dee0 Fix deadline usage on websocket conn 2023-04-16 16:28:40 +08:00
世界 9df96ac7f1 Fix deadline usage on websocket conn 2023-04-16 16:28:40 +08:00
世界 0b3bc5d31e Fix conntrack return pointer 2023-04-14 21:00:45 +08:00
世界 87cd925144 Fix conntrack return pointer 2023-04-14 21:00:45 +08:00
世界 babdd30609 android: Remove Seq.Delete warning 2023-04-14 21:00:40 +08:00
世界 fecb796000 android: Remove Seq.Delete warning 2023-04-14 21:00:40 +08:00
世界 cb63273a2f Print sniff result 2023-04-14 21:00:01 +08:00
世界 cfb6c804aa Print sniff result 2023-04-14 21:00:01 +08:00
世界 805698e3c8 Fix processing domain address in packet 2023-04-14 20:59:57 +08:00
世界 11c50c7558 Fix processing domain address in packet 2023-04-14 20:59:57 +08:00
世界 de67cf78bc Fix parsing query in http path 2023-04-14 20:59:16 +08:00
世界 34cc7f176e Fix parsing query in http path 2023-04-14 20:59:16 +08:00
Xiaokang Wang (Shelikhoo)and世界 3cd442b8a9 Fix '?' at end of WebSocket path get escaped
This fix align sing-box's behaviour with V2Ray when it comes to processing ? at the end of WebSocket's path.
2023-04-14 20:58:12 +08:00
Xiaokang Wang (Shelikhoo)and世界 b54da9c6af Fix '?' at end of WebSocket path get escaped
This fix align sing-box's behaviour with V2Ray when it comes to processing ? at the end of WebSocket's path.
2023-04-14 20:58:12 +08:00
世界 9fbf940167 Fix workflows 2023-04-14 20:57:08 +08:00
世界 f44f86b832 Fix workflows 2023-04-14 20:57:08 +08:00
世界 9be922b636 Fix find process user 2023-04-14 20:56:58 +08:00
世界 4ebf40f582 Fix find process user 2023-04-14 20:56:58 +08:00
世界 de7d0112d3 Fix set HTTP TLS ALPN 2023-04-14 20:56:55 +08:00
世界 53e4302143 Fix set HTTP TLS ALPN 2023-04-14 20:56:55 +08:00
世界 3734545322 Fix v2ray http transport server read request 2023-04-14 20:56:51 +08:00
世界 cf778eda4f Fix v2ray http transport server read request 2023-04-14 20:56:51 +08:00
世界 00c52a3c3b Update cancel context usage 2023-04-14 20:56:16 +08:00
世界 bb63429079 Update cancel context usage 2023-04-14 20:56:16 +08:00
世界 694077c16c Fix write log to stderr 2023-04-14 20:55:57 +08:00
世界 f7f9a7ae20 Fix write log to stderr 2023-04-14 20:55:57 +08:00
世界 b0421621f5 platform: Add stderr redirect 2023-04-14 20:55:45 +08:00
世界 8699412a4c platform: Add stderr redirect 2023-04-14 20:55:45 +08:00
世界 799b2808df Fix write http status after response sent 2023-04-14 20:55:20 +08:00
世界 0d7aa19cd1 Fix write http status after response sent 2023-04-14 20:55:20 +08:00
世界 9be64e638e Replace usages of uber/atomic 2023-04-14 20:55:05 +08:00
世界 50a7295360 Replace usages of uber/atomic 2023-04-14 20:55:05 +08:00
世界 a3932216e1 Update dependencies 2023-04-14 20:54:56 +08:00
世界 e57b6ae98d Update dependencies 2023-04-14 20:54:56 +08:00
世界 ab626423d1 Add loopback check 2023-04-08 09:13:50 +08:00
世界 6843970536 Add loopback check 2023-04-08 09:13:50 +08:00
世界 11f32efd42 Add close monitor 2023-04-08 08:10:03 +08:00
世界 62425ad3e4 Add close monitor 2023-04-08 08:10:03 +08:00
世界 c8292b1e6b Add start and close track message 2023-04-08 08:09:28 +08:00
世界 e1e217854e Add start and close track message 2023-04-08 08:09:28 +08:00
世界 9a9f298f5b platform: Fix build on windows 2023-04-07 21:10:16 +08:00
世界 5bf177b021 platform: Fix build on windows 2023-04-07 21:10:16 +08:00
世界 adc891b901 documentation: Update changelog 2023-04-07 19:18:26 +08:00
世界 72dbf2e2b4 documentation: Update changelog 2023-04-07 19:18:26 +08:00
世界 ef2fe786eb Fix v2ray HTTP/1.1 transport compatibility 2023-04-07 18:20:07 +08:00
世界 46c318c6fe Fix v2ray HTTP/1.1 transport compatibility 2023-04-07 18:20:07 +08:00
世界 8577818033 dns: Fix rewrite TTL 2023-04-07 16:19:34 +08:00
世界 05bb1b88c3 dns: Fix rewrite TTL 2023-04-07 16:19:34 +08:00
世界 3a49ee9218 Update dependencies 2023-04-07 16:19:34 +08:00
世界 5176ea9fe0 Update dependencies 2023-04-07 16:19:34 +08:00
世界 7281ac268d dns: Fix calculate TTL 2023-04-07 13:12:16 +08:00
世界 36d349acd2 dns: Fix calculate TTL 2023-04-07 13:12:16 +08:00
世界 3ad91d1a2b Update reality protocol 2023-04-06 19:05:05 +08:00
世界 4feee983b5 Update reality protocol 2023-04-06 19:05:05 +08:00
世界 9acfa966a5 Update client documentation 2023-04-06 12:51:26 +08:00
世界 9b12e3e389 Update client documentation 2023-04-06 12:51:26 +08:00
世界 f7a259599e Minor fixes 2023-04-05 21:41:06 +08:00
世界 afd3464216 Minor fixes 2023-04-05 21:41:06 +08:00
世界 7f61ce603f platform: Fixes and improvements 2023-04-05 19:54:20 +08:00
世界 8b64446274 platform: Fixes and improvements 2023-04-05 19:54:20 +08:00
世界 1acb794393 Refactor log factory constructor 2023-04-03 20:24:13 +08:00
世界 28aa4c4d1f Refactor log factory constructor 2023-04-03 20:24:13 +08:00
世界 aa9611d929 platform: Add http client 2023-04-03 15:12:44 +08:00
世界 0be3cdc8fb platform: Add http client 2023-04-03 15:12:44 +08:00
armv9and世界 b86beb0d7d conntrack: Fix missing tracking for udp conn 2023-04-02 12:06:03 +08:00
armv9and世界 f8be484019 conntrack: Fix missing tracking for udp conn 2023-04-02 12:06:03 +08:00
世界 cd496991ba Improve UDP domain destination NAT 2023-04-02 12:05:59 +08:00
世界 35f03f092d Improve UDP domain destination NAT 2023-04-02 12:05:59 +08:00
世界 71387e78e2 platform: Add check config func 2023-04-02 10:35:03 +08:00
世界 c3d7401ead platform: Add check config func 2023-04-02 10:35:03 +08:00
世界 e8ed25dda6 documentation: Update changelog 2023-03-31 16:29:08 +08:00
世界 4db7eb9d9e documentation: Update changelog 2023-03-31 16:29:08 +08:00
世界 9bfa0a8f73 Fix dns transport read 2023-03-31 14:31:35 +08:00
世界 fd4efd6104 Fix dns transport read 2023-03-31 14:31:35 +08:00
世界 93b8dcf9fe Fix http2 transport close 2023-03-31 14:31:35 +08:00
世界 19a35ec6a4 Fix http2 transport close 2023-03-31 14:31:35 +08:00
世界 9ecea8876d Update release scripts 2023-03-31 14:31:35 +08:00
世界 2012c0ca1e Update release scripts 2023-03-31 14:31:35 +08:00
世界 d9db4e9b1c Append time to session log 2023-03-31 14:31:35 +08:00
世界 187421c754 Append time to session log 2023-03-31 14:31:35 +08:00
世界 d22f7a67e4 Accept "any" outbound in dns rule 2023-03-31 14:31:35 +08:00
世界 b3fb86d415 Accept "any" outbound in dns rule 2023-03-31 14:31:35 +08:00
世界 4725cd58b5 Fix dns routing context 2023-03-31 09:14:04 +08:00
世界 88fafd4e30 Fix dns routing context 2023-03-31 09:14:04 +08:00
世界 5b36d547c0 Update documentation 2023-03-27 08:23:01 +08:00
世界 8056932f9c Update documentation 2023-03-27 08:23:01 +08:00
世界 bfeacffe3c Update dependencies 2023-03-27 08:22:56 +08:00
世界 c8af003bfc Update dependencies 2023-03-27 08:22:56 +08:00
世界 57e3828232 Fix missing default host in v2ray http transport`s request 2023-03-27 08:20:59 +08:00
世界 4999441a85 Fix missing default host in v2ray http transport`s request 2023-03-27 08:20:59 +08:00
世界 d45663a022 Revert remove install shell 2023-03-27 08:20:55 +08:00
世界 09b001e795 Revert remove install shell 2023-03-27 08:20:55 +08:00
世界 4dd8f8fc2a Update LICENSE 2023-03-27 08:20:51 +08:00
世界 3b3a251008 Update LICENSE 2023-03-27 08:20:51 +08:00
世界 ae212975ab Update dockerfile 2023-03-24 08:29:11 +08:00
世界 2e4eb9aa39 Update dockerfile 2023-03-24 08:29:11 +08:00
世界 99fbe324ed documentation: Update changelog 2023-03-24 08:04:36 +08:00
世界 77fd284703 documentation: Update changelog 2023-03-24 08:04:36 +08:00
世界 607fc9edc7 Update dependencies 2023-03-24 07:06:45 +08:00
世界 0a4517f4b7 Update dependencies 2023-03-24 07:06:45 +08:00
世界 80ad636c13 documentation: Update set_system_proxy usage 2023-03-23 21:27:50 +08:00
世界 4395db3206 documentation: Update set_system_proxy usage 2023-03-23 21:27:50 +08:00
世界 bc54b92b21 Fix slow open 2023-03-23 17:14:38 +08:00
世界 dd5b0abc67 Fix slow open 2023-03-23 17:14:38 +08:00
世界 9c086c9aa6 Fix wireguard mutex 2023-03-23 15:43:17 +08:00
世界 466800aa3a Fix wireguard mutex 2023-03-23 15:43:17 +08:00
世界 65bee80487 Improve timeout canceler 2023-03-23 15:39:12 +08:00
世界 4328c535a9 Improve timeout canceler 2023-03-23 15:39:12 +08:00
世界 aefa794cdd Update documentation 2023-03-23 07:54:24 +08:00
世界 f9516709da Update documentation 2023-03-23 07:54:24 +08:00
世界 30f4baa703 Update dependencies 2023-03-23 07:49:14 +08:00
世界 5dce722879 Update dependencies 2023-03-23 07:49:14 +08:00
世界 045a0c71b9 Fix import format 2023-03-20 23:01:54 +08:00
世界 9324a39d4e Fix import format 2023-03-20 23:01:54 +08:00
世界 f8f6e22b9a Create working directory if not exists 2023-03-20 19:33:00 +08:00
世界 84904c5206 Create working directory if not exists 2023-03-20 19:33:00 +08:00
世界 c168aff1fa hysteria: Accept inbound configuration without users 2023-03-20 19:22:46 +08:00
世界 fe4b429fc2 hysteria: Accept inbound configuration without users 2023-03-20 19:22:46 +08:00
世界 471cf98d5e Add with_reality_server to release build tags 2023-03-20 17:36:59 +08:00
世界 f680d0acaf Add with_reality_server to release build tags 2023-03-20 17:36:59 +08:00
世界 cfb02504a6 documentation: Update changelog 2023-03-20 17:32:59 +08:00
世界 4baff5aeb1 documentation: Update changelog 2023-03-20 17:32:59 +08:00
世界 bdc9a4c488 Update dependencies 2023-03-20 17:27:48 +08:00
世界 f25296fb23 Update dependencies 2023-03-20 17:27:48 +08:00
世界 5e94eca7d1 Fix optional listen address 2023-03-19 20:46:22 +08:00
世界 e717852c73 Fix optional listen address 2023-03-19 20:46:22 +08:00
世界 3122cd087e Fix make build 2023-03-19 16:57:07 +08:00
世界 13dc70f649 Fix make build 2023-03-19 16:57:07 +08:00
世界 8e1e4ac375 Fix vision padding overflow 2023-03-19 10:25:35 +08:00
世界 46040a71c3 Fix vision padding overflow 2023-03-19 10:25:35 +08:00
世界 b5f04aa260 ntp: Add write_to_system service option 2023-03-18 23:11:40 +08:00
世界 0558b3fc5c ntp: Add write_to_system service option 2023-03-18 23:11:40 +08:00
世界 b19d05cf1b Add command to fetch a URL 2023-03-18 21:02:29 +08:00
世界 99b2ab5526 Add command to fetch a URL 2023-03-18 21:02:29 +08:00
世界 40d5b077d1 Add command to connect an address 2023-03-18 20:27:38 +08:00
世界 e5f3bb6344 Add command to connect an address 2023-03-18 20:27:38 +08:00
世界 5c3da34fab Add multiple configuration support 2023-03-18 20:27:38 +08:00
世界 c7f89ad88e Add multiple configuration support 2023-03-18 20:27:38 +08:00
世界 d25d4e04b3 Fix test 2023-03-18 17:02:55 +08:00
世界 e0d9f79445 Fix test 2023-03-18 17:02:55 +08:00
世界 3630de940e Fix write nil in buffered vectorised writer 2023-03-18 16:32:28 +08:00
世界 b6dbb69fc4 Fix write nil in buffered vectorised writer 2023-03-18 16:32:28 +08:00
世界 98eb92d23b documentation: Fix broken link 2023-03-18 16:31:15 +08:00
世界 b76fabee65 documentation: Fix broken link 2023-03-18 16:31:15 +08:00
世界 852fd3c108 readme: Add packaging status 2023-03-17 17:58:08 +08:00
世界 872bcfd1c0 readme: Add packaging status 2023-03-17 17:58:08 +08:00
世界 3f4891d46c documentation: Update stable changelog 2023-03-17 17:58:08 +08:00
世界 b033c13ca2 documentation: Update stable changelog 2023-03-17 17:58:08 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
24ae0e23e2 dependencies: Update actions/setup-go action to v4
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 17:58:08 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2db188f3a1 dependencies: Update actions/setup-go action to v4
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 17:58:08 +08:00
世界 1d86c86142 Add experimental debug options 2023-03-17 17:58:08 +08:00
世界 11de271c8f Add experimental debug options 2023-03-17 17:58:08 +08:00
世界 6b5d8ed99a documentation: Fix typo 2023-03-17 13:34:36 +08:00
世界 40c800c57c documentation: Fix typo 2023-03-17 13:34:36 +08:00
世界 f3e134b53c documentation: Update UoT application support status 2023-03-17 13:28:05 +08:00
世界 91b0540e95 documentation: Update UoT application support status 2023-03-17 13:28:05 +08:00
世界 3e90aad287 Update documentation 2023-03-17 13:07:22 +08:00
世界 ce6d186345 Update documentation 2023-03-17 13:07:22 +08:00
世界 7a729f9fc6 Update dependencies 2023-03-17 12:59:12 +08:00
世界 32bc4450a7 Update dependencies 2023-03-17 12:59:12 +08:00
世界 b248d73163 Update UoT protocol 2023-03-17 12:57:48 +08:00
世界 43f31b40ba Update UoT protocol 2023-03-17 12:57:48 +08:00
世界 bbd1d02e66 platform: Fix bytes format 2023-03-16 11:28:54 +08:00
世界 a3a5185b15 platform: Fix bytes format 2023-03-16 11:28:54 +08:00
世界 37cfd2d9d0 ios: Add with_quic tag in build 2023-03-16 11:28:54 +08:00
世界 14a0f180c8 ios: Add with_quic tag in build 2023-03-16 11:28:54 +08:00
世界 161668a14e platform: Add oom killer 2023-03-16 11:28:54 +08:00
世界 cc9cb0b477 platform: Add oom killer 2023-03-16 11:28:54 +08:00
世界 560407495b platform: Add low memory interface 2023-03-16 00:36:04 +08:00
世界 2cb0e37f50 platform: Add low memory interface 2023-03-16 00:36:04 +08:00
世界 e27beef891 tun: Create gVisor stack by default in Apple Network Extension 2023-03-15 21:50:18 +08:00
世界 dbd5be55b0 tun: Create gVisor stack by default in Apple Network Extension 2023-03-15 21:50:18 +08:00
世界 a1535b8ec4 Fix build embed tor for mobile 2023-03-15 20:59:45 +08:00
世界 f674b4fbd5 Fix build embed tor for mobile 2023-03-15 20:59:45 +08:00
世界 294957d5ac Fix lint 2023-03-15 14:56:06 +08:00
世界 5a4e8fea81 Fix lint 2023-03-15 14:56:06 +08:00
世界 5d33809ab7 Update UoT protocol 2023-03-15 14:52:32 +08:00
世界 78e02b52ca Update UoT protocol 2023-03-15 14:52:32 +08:00
世界 b3c3c6a925 Update dependencies 2023-03-15 11:59:15 +08:00
世界 ffdaae90d7 Update dependencies 2023-03-15 11:59:15 +08:00
世界 17de4aee1b Fix close platform tun 2023-03-13 19:47:00 +08:00
世界 c77681ea17 Fix close platform tun 2023-03-13 19:47:00 +08:00
世界 033740f1bb Fix cross make build 2023-03-13 19:46:20 +08:00
世界 d824390167 Fix cross make build 2023-03-13 19:46:20 +08:00
世界 d46a63b537 Remove length limit on short_id for reality TLS config 2023-03-13 19:46:16 +08:00
世界 70cf681ff2 Remove length limit on short_id for reality TLS config 2023-03-13 19:46:16 +08:00
wwqgtxxand世界 4c67101519 Fix stack wireguard device returning non-nil interface containing nil pointer 2023-03-13 19:46:16 +08:00
wwqgtxxand世界 b004b9ec81 Fix stack wireguard device returning non-nil interface containing nil pointer 2023-03-13 19:46:16 +08:00
世界 c0e2d90f9f Print command to shell error 2023-03-13 19:46:16 +08:00
世界 657b05fd96 Print command to shell error 2023-03-13 19:46:16 +08:00
世界 0e0395794b Apply --disable-color to global logger 2023-03-13 11:23:00 +08:00
世界 caad60da45 Apply --disable-color to global logger 2023-03-13 11:23:00 +08:00
世界 2d0e4acc06 Support $schema in configuration file 2023-03-13 10:58:29 +08:00
世界 7d22cf9b45 Support $schema in configuration file 2023-03-13 10:58:29 +08:00
世界 47abbf36a8 Update documentation 2023-03-12 23:07:38 +08:00
世界 5cb178ca93 Update documentation 2023-03-12 23:07:38 +08:00
世界 7d6c8f1d25 Update dependencies 2023-03-12 23:07:24 +08:00
世界 16788008b6 Update dependencies 2023-03-12 23:07:24 +08:00
世界 7cd71cc9d4 Fix make install 2023-03-11 19:24:19 +08:00
世界 6ec7a33046 Fix make install 2023-03-11 19:24:19 +08:00
世界 c1ebf17269 Add health check support for http-based v2ray transport 2023-03-11 15:49:02 +08:00
世界 6af9c2b3ca Add health check support for http-based v2ray transport 2023-03-11 15:49:02 +08:00
世界 73af4cc2c3 Fix http server usage 2023-03-11 15:05:07 +08:00
世界 bdc620dab1 Fix http server usage 2023-03-11 15:05:07 +08:00
世界 53302e91dd Fix missing default shadowtls version 2023-03-11 10:12:46 +08:00
世界 a88820af31 Fix missing default shadowtls version 2023-03-11 10:12:46 +08:00
世界 eab828e44e Update documentation 2023-03-10 11:15:00 +08:00
世界 3688f2e114 Update documentation 2023-03-10 11:15:00 +08:00
世界 8b053f5d8e Update dependencies 2023-03-09 23:24:05 +08:00
世界 a183958d53 Update dependencies 2023-03-09 23:24:05 +08:00
世界 8662ffcf07 Generate version during compilation 2023-03-09 23:24:05 +08:00
世界 1c8a9e91b7 Generate version during compilation 2023-03-09 23:24:05 +08:00
世界 9c929266ab Fix windows interface monitor 2023-03-09 16:00:57 +08:00
世界 325f6c71ff Fix windows interface monitor 2023-03-09 16:00:57 +08:00
世界 c6bc130078 Update reality and uTLS 2023-03-09 10:51:01 +08:00
世界 6c6c0792ad Update reality and uTLS 2023-03-09 10:51:01 +08:00
世界 9d46a71766 Fix link broken in installation documentation page 2023-03-08 15:56:41 +08:00
世界 9264f2307c Fix link broken in installation documentation page 2023-03-08 15:56:41 +08:00
世界 5e8fb195b0 Fix build check 2023-03-08 15:23:46 +08:00
世界 87dd328700 Fix build check 2023-03-08 15:23:46 +08:00
世界 583fea6546 Update documentation 2023-03-08 14:59:09 +08:00
世界 0cec92dd0f Update documentation 2023-03-08 14:59:09 +08:00
世界 4768bc05f0 Fix vmess server buffer 2023-03-07 17:07:37 +08:00
世界 e88afa9665 Fix vmess server buffer 2023-03-07 17:07:37 +08:00
世界 82bab63ba2 Check constant.Version before build release 2023-03-06 16:34:44 +08:00
世界 3883a81315 Check constant.Version before build release 2023-03-06 16:34:44 +08:00
Dmitry Rand世界 4590a7fde8 systemd: Add reload command 2023-03-06 16:32:54 +08:00
Dmitry Rand世界 c919ad079a systemd: Add reload command 2023-03-06 16:32:54 +08:00
世界 6fa7ca167b Fix vless read cache 2023-03-06 11:19:38 +08:00
世界 83593aee70 Fix vless read cache 2023-03-06 11:19:38 +08:00
世界 ecf288d9d4 Update documentation 2023-03-05 23:37:12 +08:00
世界 ac7cc09694 Update documentation 2023-03-05 23:37:12 +08:00
世界 4b58a7f824 Update dependencies 2023-03-05 21:38:02 +08:00
世界 d032e3568b Update dependencies 2023-03-05 21:38:02 +08:00
世界 ddf66a6cf3 Add documentation for tun platform options 2023-03-05 15:19:13 +08:00
世界 c24df037ac Add documentation for tun platform options 2023-03-05 15:19:13 +08:00
世界 9cda68b053 Fix open cache file 2023-03-05 14:57:50 +08:00
世界 a2d43b3746 Fix open cache file 2023-03-05 14:57:50 +08:00
世界 9d5090afdd Fix vision read 2023-03-05 14:57:50 +08:00
世界 5b3b74bd0f Fix vision read 2023-03-05 14:57:50 +08:00
世界 630710ae7a Fix uTLS randomized fingerprint 2023-03-05 14:57:50 +08:00
世界 d24d3b26dc Fix uTLS randomized fingerprint 2023-03-05 14:57:50 +08:00
seiunekoand世界 46a8deaf2f Fix documentation typo 2023-03-05 14:57:50 +08:00
seiunekoand世界 5db3cd7781 Fix documentation typo 2023-03-05 14:57:50 +08:00
世界 91a0bc6dd4 Fix documentation 2023-03-05 14:57:50 +08:00
世界 c88af8b081 Fix documentation 2023-03-05 14:57:50 +08:00
世界 50b86137ed Fix check config 2023-03-05 14:57:50 +08:00
世界 45852ca3e7 Fix check config 2023-03-05 14:57:50 +08:00
Hellojackand世界 964ab8578d Add generate commands 2023-03-05 11:21:32 +08:00
Hellojackand世界 03ce555104 Add generate commands 2023-03-05 11:21:32 +08:00
世界 7cad6aa32d Add stop platform command 2023-03-04 00:40:47 +08:00
世界 dd0a07624e Add stop platform command 2023-03-04 00:40:47 +08:00
世界 8a6490afad Add reload platform command 2023-03-03 21:59:54 +08:00
世界 b9b2b77814 Add reload platform command 2023-03-03 21:59:54 +08:00
世界 a7895f254d Fix close conn 2023-03-03 19:27:30 +08:00
世界 2366835121 Fix close conn 2023-03-03 19:27:30 +08:00
database64128 23ef1012cb Update .gitignore 2023-03-03 18:51:33 +08:00
database64128 42e1dea7d2 Update .gitignore 2023-03-03 18:51:33 +08:00
Ella Hollywoodand世界 7c52796127 Fix documentation typo 2023-03-03 16:35:06 +08:00
Ella Hollywoodand世界 13d7716b02 Fix documentation typo 2023-03-03 16:35:06 +08:00
世界 72e8b21c03 Minor fixes 2023-03-03 16:31:07 +08:00
世界 7ecb9fc738 Minor fixes 2023-03-03 16:31:07 +08:00
世界 7ca1da09d7 Fix UoT UDP address 2023-03-03 11:34:51 +08:00
世界 19b15e0d10 Fix UoT UDP address 2023-03-03 11:34:51 +08:00
database64128 9c2bd7cca2 Update tfo-go 2023-03-03 10:16:38 +08:00
database64128 0b15de461b Update tfo-go 2023-03-03 10:16:38 +08:00
世界 c2e0369870 Fix command client connect 2023-03-02 16:40:28 +08:00
世界 27aba99e6c Fix command client connect 2023-03-02 16:40:28 +08:00
世界 8f10ac8b00 Add ios memory limit 2023-03-02 15:04:59 +08:00
世界 8151bcfd6b Add ios memory limit 2023-03-02 15:04:59 +08:00
世界 8cc30246e2 Fix vless tests 2023-03-02 00:31:56 +08:00
世界 e8802357e1 Fix vless tests 2023-03-02 00:31:56 +08:00
世界 a78736b2a1 Improve server error handling 2023-03-02 00:18:35 +08:00
世界 6e22c004f6 Improve server error handling 2023-03-02 00:18:35 +08:00
世界 fdde818ae7 Fix custom tls server listener 2023-03-02 00:01:40 +08:00
世界 20e1caa531 Fix custom tls server listener 2023-03-02 00:01:40 +08:00
世界 31df89ff2b Remove okhttp form modern fingerprint list 2023-03-01 21:17:30 +08:00
世界 32ad3c3db3 Remove okhttp form modern fingerprint list 2023-03-01 21:17:30 +08:00
世界 f2f9af1504 Fixed user flow in vless server 2023-03-01 20:28:40 +08:00
世界 1f5f8a7dde Fixed user flow in vless server 2023-03-01 20:28:40 +08:00
世界 e443f62581 Fix geo resource download path 2023-03-01 19:09:21 +08:00
世界 6da1460795 Fix geo resource download path 2023-03-01 19:09:21 +08:00
世界 7d5ec2dac4 Fix create badhttp2 server 2023-03-01 19:09:21 +08:00
世界 b14ae51f71 Fix create badhttp2 server 2023-03-01 19:09:21 +08:00
世界 55759d9135 Refactor platform command api 2023-03-01 19:09:21 +08:00
世界 5af8d001ae Refactor platform command api 2023-03-01 19:09:21 +08:00
世界 4f1cfe2338 Fix uTLS ALPN 2023-02-28 21:16:31 +08:00
世界 0ca344df5f Fix uTLS ALPN 2023-02-28 21:16:31 +08:00
世界 1a362e094e Separate uTLS random fingerprint 2023-02-28 21:10:11 +08:00
世界 49f568abbd Separate uTLS random fingerprint 2023-02-28 21:10:11 +08:00
世界 b381e07774 Add reality client fallback 2023-02-28 20:55:14 +08:00
世界 3b4e811907 Add reality client fallback 2023-02-28 20:55:14 +08:00
世界 e76403c2d9 Enable XUDP by default in VLESS 2023-02-28 20:52:26 +08:00
世界 d0e9443031 Enable XUDP by default in VLESS 2023-02-28 20:52:26 +08:00
世界 fc03226a87 Fix check early conn 2023-02-28 20:16:15 +08:00
世界 f7e9d9ab1f Fix check early conn 2023-02-28 20:16:15 +08:00
世界 6734715440 Add tun platform options 2023-02-28 19:02:27 +08:00
世界 7834d6bca7 Add tun platform options 2023-02-28 19:02:27 +08:00
世界 5dc3e1bc7d Add custom TLS server support for http based v2ray transports 2023-02-28 13:03:44 +08:00
世界 ed50257735 Add custom TLS server support for http based v2ray transports 2023-02-28 13:03:44 +08:00
世界 4eb0aa43ef Merge tls interface to library 2023-02-28 11:30:46 +08:00
世界 f15f525c5c Merge tls interface to library 2023-02-28 11:30:46 +08:00
世界 41b3311c44 Update vision protocol 2023-02-27 15:07:15 +08:00
世界 e4bff0460d Update vision protocol 2023-02-27 15:07:15 +08:00
世界 39acddf2c3 Add early conn interface 2023-02-26 23:08:20 +08:00
世界 5ce3ddee9b Add early conn interface 2023-02-26 23:08:20 +08:00
世界 329f0885ab Update reality server 2023-02-26 20:55:36 +08:00
世界 22bf7a9509 Update reality server 2023-02-26 20:55:36 +08:00
世界 a338f3a5ba Update TUN creation 2023-02-26 20:55:15 +08:00
世界 842730707c Update TUN creation 2023-02-26 20:55:15 +08:00
世界 cebd730cf2 Fix documentation 2023-02-25 17:25:56 +08:00
世界 a8f13bd956 Fix documentation 2023-02-25 17:25:56 +08:00
世界 a0473e8aac Update documentation 2023-02-25 16:28:39 +08:00
世界 cd5c2a7999 Update documentation 2023-02-25 16:28:39 +08:00
世界andGitHub dc5bb1fa9d Add VLESS server, vision flow and reality TLS 2023-02-25 16:24:08 +08:00
世界andGitHub fbc94b9e3e Add VLESS server, vision flow and reality TLS 2023-02-25 16:24:08 +08:00
zakuwakiandGitHub 21ba99a66b Fix private ip will never be matched 2023-02-24 13:31:49 +08:00
zakuwakiandGitHub e766f25d55 Fix private ip will never be matched 2023-02-24 13:31:49 +08:00
世界 8f13166475 Fix platform wrapper 2023-02-24 13:00:49 +08:00
世界 140ed9a4cb Fix platform wrapper 2023-02-24 13:00:49 +08:00
世界 d8a6df02ad Update documentation 2023-02-22 11:45:31 +08:00
世界 60094884cd Update documentation 2023-02-22 11:45:31 +08:00
H3arnandGitHub 814c77bb36 Fix incorrect NTP server address 2023-02-21 23:08:05 +08:00
H3arnandGitHub 0e8a4d141a Fix incorrect NTP server address 2023-02-21 23:08:05 +08:00
世界 83a9636948 Fix documentation 2023-02-21 22:06:12 +08:00
世界 17b78a6339 Fix documentation 2023-02-21 22:06:12 +08:00
世界 8cc5f9a2bf Update documentation 2023-02-21 20:54:25 +08:00
世界 e99741159b Update documentation 2023-02-21 20:54:25 +08:00
世界 c84a35e477 Add strict mode support for shadowtls v3 2023-02-21 20:51:26 +08:00
世界 6b9603227b Add strict mode support for shadowtls v3 2023-02-21 20:51:26 +08:00
世界 e205ea6371 Add multiple server names and multi-user support for shadowtls 2023-02-21 16:09:06 +08:00
世界 23e8d282a3 Add multiple server names and multi-user support for shadowtls 2023-02-21 16:09:06 +08:00
世界 7ce6f68b5f Add NTP service 2023-02-21 16:09:06 +08:00
世界 611d6bbfc5 Add NTP service 2023-02-21 16:09:06 +08:00
世界 5635d6a4dc Add uTLS support for shadowtls v3 2023-02-20 21:04:07 +08:00
世界 f26785c0ba Add uTLS support for shadowtls v3 2023-02-20 21:04:07 +08:00
世界 bfa04897ae Update dependencies 2023-02-20 21:04:07 +08:00
世界 5bcfb71737 Update dependencies 2023-02-20 21:04:07 +08:00
世界 8d04ccf2e3 Merge shadowtls to library 2023-02-20 13:53:06 +08:00
世界 4135c4974f Merge shadowtls to library 2023-02-20 13:53:06 +08:00
世界 644153d61f Add libbox wrapper 2023-02-20 11:07:49 +08:00
世界 222196b182 Add libbox wrapper 2023-02-20 11:07:49 +08:00
世界 f9adec2f5b Fix tproxy inbound 2023-02-19 18:56:38 +08:00
世界 86e55c5c1c Fix tproxy inbound 2023-02-19 18:56:38 +08:00
世界 38f4f4a801 Update documentation 2023-02-19 17:49:05 +08:00
世界 73c068b96f Update documentation 2023-02-19 17:49:05 +08:00
世界 70993942bb Fix shadowtls in go versiojns below 1.20 2023-02-19 12:02:11 +08:00
世界 f516026540 Fix shadowtls in go versiojns below 1.20 2023-02-19 12:02:11 +08:00
dyhkwongandGitHub 8ce2b7e498 Update QUIC v2 version number and initial salt 2023-02-18 23:51:55 +08:00
dyhkwongandGitHub 3c5bc842ed Update QUIC v2 version number and initial salt 2023-02-18 23:51:55 +08:00
世界 81ca19e8f4 Update release script 2023-02-18 21:14:17 +08:00
世界 d8270a66f4 Update release script 2023-02-18 21:14:17 +08:00
世界 765e462195 Fix documentation 2023-02-18 19:33:35 +08:00
世界 123c383eae Fix documentation 2023-02-18 19:33:35 +08:00
世界 33c48abe23 Remove TLS min version for shadowtls v3 2023-02-18 19:26:05 +08:00
世界 67814faf92 Remove TLS min version for shadowtls v3 2023-02-18 19:26:05 +08:00
世界 d4f9d87e9e Update documentation 2023-02-18 15:02:27 +08:00
世界 ec4a0c8497 Update documentation 2023-02-18 15:02:27 +08:00
世界andGitHub 88f47d2469 Add ShadowTLS protocol v3 2023-02-18 14:55:47 +08:00
世界andGitHub 21cb227bc2 Add ShadowTLS protocol v3 2023-02-18 14:55:47 +08:00
世界 894c902609 Update workflow 2023-02-18 14:28:21 +08:00
世界 1610bdc5dd Update workflow 2023-02-18 14:28:21 +08:00
世界 aea87c74c2 Update dependencies 2023-02-18 14:28:21 +08:00
世界 3296a2f7b2 Update dependencies 2023-02-18 14:28:21 +08:00
世界 bbe10ad8d6 Add fallback support for v2ray transport 2023-02-18 14:28:21 +08:00
世界 2bd91baad0 Add fallback support for v2ray transport 2023-02-18 14:28:21 +08:00
世界 0391deb657 Disable vmess header protection if transport enabled 2023-02-13 05:15:26 +08:00
世界 a624cd9b49 Disable vmess header protection if transport enabled 2023-02-13 05:15:26 +08:00
Tim XylonandGitHub 620cabe209 Replace deprecated 'set-output' 2023-02-09 22:07:00 +08:00
Tim XylonandGitHub 02afba132f Replace deprecated 'set-output' 2023-02-09 22:07:00 +08:00
世界 0e4a2d3e65 Fix socks connect response 2023-02-09 21:25:00 +08:00
世界 99890a1af0 Fix socks connect response 2023-02-09 21:25:00 +08:00
世界 4b450f66ec Fix lint 2023-02-09 21:01:48 +08:00
世界 437f1f819c Fix lint 2023-02-09 21:01:48 +08:00
世界 26265634c6 Remove cancel-workflow-action 2023-02-09 18:04:49 +08:00
世界 92a79e6158 Remove cancel-workflow-action 2023-02-09 18:04:49 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
d9a30abee1 [dependencies] Update golang Docker tag to v1.20
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-09 18:04:16 +08:00
renovate[bot]世界renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
c9efd0a74f [dependencies] Update golang Docker tag to v1.20
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-09 18:04:16 +08:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2f83741d38 [dependencies] Update github-actions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-09 17:42:06 +08:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
9da349748a [dependencies] Update github-actions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-09 17:42:06 +08:00
世界 18c224ffba Add renovate config 2023-02-09 17:39:15 +08:00
世界 2423cbbbfe Add renovate config 2023-02-09 17:39:15 +08:00
Gavin Luoand世界 6b40e5f9a8 Fix systemd service caps for process sniffing 2023-02-09 13:32:31 +08:00
Gavin Luoand世界 4833f6d5db Fix systemd service caps for process sniffing 2023-02-09 13:32:31 +08:00
世界 50a367f1c5 Update scripts 2023-02-09 13:27:05 +08:00
世界 9db3cb5cb7 Update scripts 2023-02-09 13:27:05 +08:00
shadow750d6andGitHub 144b95d6f2 Fix parse hysteria UDP message 2023-02-09 13:20:16 +08:00
shadow750d6andGitHub c14b353a29 Fix parse hysteria UDP message 2023-02-09 13:20:16 +08:00
世界 85865d05ef Update documentation 2023-02-08 17:35:50 +08:00
世界 19d08b55c8 Update documentation 2023-02-08 17:35:50 +08:00
世界 2567f41fbb Add v2ray user stats api 2023-02-08 16:50:15 +08:00
世界 39514b3ca0 Add v2ray user stats api 2023-02-08 16:50:15 +08:00
世界 b4902fe36c Add DHCP DNS server support 2023-02-08 16:43:29 +08:00
世界 7ea9d48987 Add DHCP DNS server support 2023-02-08 16:43:29 +08:00
lyc8503andGitHub 66f1d43783 Add SSH outbound host key validation 2023-02-08 16:20:48 +08:00
lyc8503andGitHub df3a982141 Add SSH outbound host key validation 2023-02-08 16:20:48 +08:00
世界andGitHub 33b86ac699 Add query_type DNS rule item 2023-02-08 16:18:40 +08:00
世界andGitHub 687b4509df Add query_type DNS rule item 2023-02-08 16:18:40 +08:00
世界 9a01a0ad95 Add support for clash DNS query API 2023-02-08 14:13:33 +08:00
世界 41ec2e7944 Add support for clash DNS query API 2023-02-08 14:13:33 +08:00
世界 69c16d73bd Upgrade tfo-go 2023-02-08 14:13:33 +08:00
世界 1bd3a9144d Upgrade tfo-go 2023-02-08 14:13:33 +08:00
世界 38bbc15b4d Update dependencies 2023-02-08 14:13:15 +08:00
世界 6e852cc99b Update dependencies 2023-02-08 14:13:15 +08:00
世界 a0e39c4f4d Improve vmess request 2023-02-07 14:53:08 +08:00
世界 8320dd0b51 Improve vmess request 2023-02-07 14:53:08 +08:00
世界 2088080571 Fix match geoip 2023-02-07 12:21:00 +08:00
世界 960d04d172 Fix match geoip 2023-02-07 12:21:00 +08:00
世界 0029a67b99 Fix ipv6 redir port 2023-02-05 14:48:02 +08:00
世界 86ea035bdd Fix ipv6 redir port 2023-02-05 14:48:02 +08:00
世界 cdaf43322d Fix find NDK on macOS 2023-02-02 16:30:50 +08:00
世界 9b6449dcf4 Fix find NDK on macOS 2023-02-02 16:30:50 +08:00
世界 9c175ce05e Update documentation 2023-02-02 16:11:29 +08:00
世界 4e22ac1a35 Update documentation 2023-02-02 16:11:29 +08:00
世界 76d282e440 Update dependencies 2023-02-02 15:38:48 +08:00
世界 8a779f6e94 Update dependencies 2023-02-02 15:38:48 +08:00
世界 055df3488e Fix build with go1.20 2023-02-02 15:25:34 +08:00
世界 d461768ffb Fix build with go1.20 2023-02-02 15:25:34 +08:00
Dmitry Rand世界 b692617b4e ignore domain case in route rules 2023-02-02 15:25:34 +08:00
Dmitry Rand世界 5d41e328d4 ignore domain case in route rules 2023-02-02 15:25:34 +08:00
世界 9e68d725c1 Fix auth_user route for naive inbound 2023-01-19 10:47:22 +08:00
世界 fe492904e9 Fix auth_user route for naive inbound 2023-01-19 10:47:22 +08:00
世界 4392e0d85c Fix inbound default DF 2023-01-19 10:36:25 +08:00
世界 168253b851 Fix inbound default DF 2023-01-19 10:36:25 +08:00
HellojackandGitHub 61c69e5ff0 Fix gRPC lite header
Manually set the first byte to 0x00 (No Compression) since we can not ensure that the buffer is not polluted before.
2023-01-16 16:23:06 +08:00
HellojackandGitHub 05620a369e Fix gRPC lite header
Manually set the first byte to 0x00 (No Compression) since we can not ensure that the buffer is not polluted before.
2023-01-16 16:23:06 +08:00
世界 82dc6f0ade Fix wireguard events 2023-01-15 19:48:50 +08:00
世界 8e0fe55363 Fix wireguard events 2023-01-15 19:48:50 +08:00
世界 90d1ec387d Fix convert netaddr 2023-01-14 20:04:15 +08:00
世界 59e521c1db Fix convert netaddr 2023-01-14 20:04:15 +08:00
世界 d77d037054 Bump version 2023-01-14 16:01:07 +08:00
世界 f32c149738 Bump version 2023-01-14 16:01:07 +08:00
世界 be3d139823 Fix create UDP DNS transport from plain IPv6 address 2023-01-13 11:51:20 +08:00
世界 23a35b3c06 Fix create UDP DNS transport from plain IPv6 address 2023-01-13 11:51:20 +08:00
世界 babe75caf9 Fix write to h2 conn after closed 2023-01-08 15:43:12 +08:00
世界 044f9c5d4f Fix write to h2 conn after closed 2023-01-08 15:43:12 +08:00
世界 dccf25c6f2 Fix DNS log 2023-01-03 17:04:10 +08:00
世界 54f9625bdc Fix DNS log 2023-01-03 17:04:10 +08:00
世界 d07e925629 Bump version 2023-01-03 10:53:38 +08:00
世界 ff0693be32 Bump version 2023-01-03 10:53:38 +08:00
世界 aff14b5ad0 Improve DNS log 2023-01-03 10:36:18 +08:00
世界 53d9ad93e3 Improve DNS log 2023-01-03 10:36:18 +08:00
世界 a1181b09ca Skip set windows system proxy bypass list 2022-12-26 12:33:08 +08:00
世界 f5c5570bec Skip set windows system proxy bypass list 2022-12-26 12:33:08 +08:00
世界 3078521250 Fix override packet conn 2022-12-21 21:58:03 +08:00
世界 53f19a6ead Fix override packet conn 2022-12-21 21:58:03 +08:00
世界 3bdb639cae Fix DNS response TTL 2022-12-19 13:10:57 +08:00
世界 cfaf15f429 Fix DNS response TTL 2022-12-19 13:10:57 +08:00
世界 aefa861625 Fix user from stream packet conn 2022-12-18 16:08:49 +08:00
世界 9e67f3b4a5 Fix user from stream packet conn 2022-12-18 16:08:49 +08:00
isnowlyand世界 30bb679f6c Fix http proxy auth 2022-12-18 16:08:49 +08:00
isnowlyand世界 4d2185a2d4 Fix http proxy auth 2022-12-18 16:08:49 +08:00
世界 630235e57a Update dependencies 2022-12-18 15:40:19 +08:00
世界 33f22263ca Update dependencies 2022-12-18 15:40:19 +08:00
世界 5983585779 Fix android i686 compiler 2022-12-11 15:01:54 +08:00
世界 d09aa07d21 Fix android i686 compiler 2022-12-11 15:01:54 +08:00
世界 c0b9a4ad49 Update documentation 2022-12-11 14:40:03 +08:00
世界 8afb8ca7eb Update documentation 2022-12-11 14:40:03 +08:00
世界 88123bfc1f Fix android package 2022-12-11 14:38:01 +08:00
世界 80ed5bf8fb Fix android package 2022-12-11 14:38:01 +08:00
世界 1da29ceea2 Fix linux package 2022-12-11 11:51:25 +08:00
世界 81e7b0b320 Fix linux package 2022-12-11 11:51:25 +08:00
世界 a9022f0b47 Fix acme config 2022-12-06 13:36:42 +08:00
世界 a828c3b5da Fix acme config 2022-12-06 13:36:42 +08:00
世界 b90f71b60b Fix vmess packet conn 2022-12-06 13:02:28 +08:00
世界 c95e4a13a1 Fix vmess packet conn 2022-12-06 13:02:28 +08:00
世界 effde3fe8d Suppress quic-go set DF error 2022-12-06 12:51:52 +08:00
世界 726a7e19eb Suppress quic-go set DF error 2022-12-06 12:51:52 +08:00
世界 d68f41a968 Update workflow 2022-12-03 17:03:04 +08:00
世界 8953ddc6e0 Update workflow 2022-12-03 17:03:04 +08:00
世界 7b5272977a Update documentation 2022-12-03 14:38:52 +08:00
世界 7ebbd58b00 Update documentation 2022-12-03 14:38:52 +08:00
世界 d3fc5ed963 Fix close clash cache 2022-12-03 13:29:37 +08:00
世界 d0095fd0f4 Fix close clash cache 2022-12-03 13:29:37 +08:00
世界 f8c6b7b36e Add WorkingDirectory for systemd service 2022-11-28 18:30:50 +08:00
世界 66d8d563eb Add WorkingDirectory for systemd service 2022-11-28 18:30:50 +08:00
世界 2f862afa97 Fix quic stub 2022-11-28 16:06:54 +08:00
世界 4bf96c7eb5 Fix quic stub 2022-11-28 16:06:54 +08:00
世界 71f12565a3 Update documentation 2022-11-28 13:11:07 +08:00
世界 f687c25fa9 Update documentation 2022-11-28 13:11:07 +08:00
世界 f0ce34e8c9 Fix router 2022-11-28 13:11:07 +08:00
世界 a92412ecac Fix router 2022-11-28 13:11:07 +08:00
世界 b82dfdf7d7 Add trojan-go multiplex support for trojan inbound 2022-11-28 12:51:23 +08:00
世界 8dcafa5b33 Add trojan-go multiplex support for trojan inbound 2022-11-28 12:51:23 +08:00
世界 96f54dd8c6 Revert "Fix listen packet on address"
This reverts commit c70028b094.
2022-11-28 12:51:23 +08:00
世界 7a02cb83a7 Revert "Fix listen packet on address"
This reverts commit d1fe17a4db.
2022-11-28 12:51:23 +08:00
世界 a4113864b7 Fix crash when input bad method in shadowsocks multi-user inbound 2022-11-28 12:51:23 +08:00
世界 51ce672076 Fix crash when input bad method in shadowsocks multi-user inbound 2022-11-28 12:51:23 +08:00
世界 1e9796bdf1 Update dependencies 2022-11-28 12:51:23 +08:00
世界 7734afc40c Update dependencies 2022-11-28 12:51:23 +08:00
世界 4ad7ce54f0 Fix tls config for h2 server 2022-11-26 14:55:51 +08:00
世界 ee3cd49aa5 Fix tls config for h2 server 2022-11-26 14:55:51 +08:00
世界 80db96eac8 Fix lint 2022-11-26 11:21:24 +08:00
世界 bf20ff84b5 Fix lint 2022-11-26 11:21:24 +08:00
世界 29f7bc9fda Fix documentation 2022-11-26 11:06:57 +08:00
世界 c58302554c Fix documentation 2022-11-26 11:06:57 +08:00
世界 1709045b79 Update documentation 2022-11-25 22:59:30 +08:00
世界 05ed88aba8 Update documentation 2022-11-25 22:59:30 +08:00
世界 f845c3f5f0 Fix dockerfile 2022-11-25 22:59:30 +08:00
世界 9f5cc0442b Fix dockerfile 2022-11-25 22:59:30 +08:00
世界 fc962e2c99 Remove test on pull request 2022-11-25 21:12:45 +08:00
世界 2641a43ad8 Remove test on pull request 2022-11-25 21:12:45 +08:00
世界 28d4784669 Fix cancel on start 2022-11-25 21:12:45 +08:00
世界 4a6ab5e9fd Fix cancel on start 2022-11-25 21:12:45 +08:00
世界 c70028b094 Fix listen packet on address 2022-11-25 21:12:45 +08:00
世界 d1fe17a4db Fix listen packet on address 2022-11-25 21:12:45 +08:00
世界 2f59760d39 Cleanup code 2022-11-24 12:37:29 +08:00
世界 7c910165ef Cleanup code 2022-11-24 12:37:29 +08:00
世界 b0d8af3871 Remove connect packet conn 2022-11-24 12:01:25 +08:00
世界 8c1fddcf8d Remove connect packet conn 2022-11-24 12:01:25 +08:00
HellojackandGitHub 65c0c298d8 Cleanup gun conn code 2022-11-23 14:56:31 +08:00
HellojackandGitHub 01b4769852 Cleanup gun conn code 2022-11-23 14:56:31 +08:00
世界 2f61972d18 Fix shadowtls server detection 2022-11-22 22:15:38 +08:00
世界 a401828ed5 Fix shadowtls server detection 2022-11-22 22:15:38 +08:00
世界 7d27348401 Update documentation 2022-11-21 21:20:44 +08:00
世界 ffd54eef6c Update documentation 2022-11-21 21:20:44 +08:00
世界 c3c93a82dd Fix shadowtls server 2022-11-21 21:20:44 +08:00
世界 c16e4316d6 Fix shadowtls server 2022-11-21 21:20:44 +08:00
世界 8a9e8e2b60 Include uTLS in release 2022-11-21 15:25:49 +08:00
世界 8b7fe20b7f Include uTLS in release 2022-11-21 15:25:49 +08:00
世界 961faabf84 Update stable documentation 2022-11-21 14:57:22 +08:00
世界 696c1065b6 Update stable documentation 2022-11-21 14:57:22 +08:00
世界 09c4ca9b99 Update documentation 2022-11-21 13:18:04 +08:00
世界 5d690f4147 Update documentation 2022-11-21 13:18:04 +08:00
世界 092661970d Add uTLS to makefile default tags 2022-11-21 13:18:04 +08:00
世界 f906641a82 Add uTLS to makefile default tags 2022-11-21 13:18:04 +08:00
世界 4b2ee8b9e7 Improve shadowtls server 2022-11-21 13:18:04 +08:00
世界 89913dfa8c Improve shadowtls server 2022-11-21 13:18:04 +08:00
世界 573745eb56 Update dependencies 2022-11-21 13:18:04 +08:00
世界 468778f67f Update dependencies 2022-11-21 13:18:04 +08:00
世界 827a008262 Fix default dns transport strategy 2022-11-21 13:18:04 +08:00
世界 22a22aebe2 Fix default dns transport strategy 2022-11-21 13:18:04 +08:00
世界 c5f634355b Update documentation 2022-11-15 17:36:42 +08:00
世界 a2d2ec9b45 Update documentation 2022-11-15 17:36:42 +08:00
世界 072378acc2 Update issue template 2022-11-13 11:45:24 +08:00
世界 2695b3516e Update issue template 2022-11-13 11:45:24 +08:00
世界 61d622a6a2 Remove unused 2022-11-13 11:30:48 +08:00
世界 3a9ef8fac0 Remove unused 2022-11-13 11:30:48 +08:00
世界 100d0a32f4 Fix create TLS config 2022-11-13 11:24:37 +08:00
世界 ebad363201 Fix create TLS config 2022-11-13 11:24:37 +08:00
世界 4d3dde7776 Fix dns buffer & quic retry 2022-11-13 11:16:10 +08:00
世界 11076d52cd Fix dns buffer & quic retry 2022-11-13 11:16:10 +08:00
世界 53148f8a07 Fix connect packet connection for mux client 2022-11-12 03:53:42 +08:00
世界 5eb132063e Fix connect packet connection for mux client 2022-11-12 03:53:42 +08:00
世界 a63ced21f0 Remove follow in update script 2022-11-11 22:32:24 +08:00
世界 13ab5d3348 Remove follow in update script 2022-11-11 22:32:24 +08:00
世界 39e2d33bef Support x/h2 v0.2.0 deadline 2022-11-11 22:08:20 +08:00
世界 ce1ddc400f Support x/h2 v0.2.0 deadline 2022-11-11 22:08:20 +08:00
arm64v8aand世界 7c825af248 Fix websocket alpn 2022-11-11 20:01:49 +08:00
arm64v8aand世界 2c9d25e853 Fix websocket alpn 2022-11-11 20:01:49 +08:00
世界 6f5fa2b84d Fix tor geoip 2022-11-10 22:42:05 +08:00
世界 3d76777760 Fix tor geoip 2022-11-10 22:42:05 +08:00
世界 8fce0003be Fix hysteria test 2022-11-10 21:10:18 +08:00
世界 24f4dfea04 Fix hysteria test 2022-11-10 21:10:18 +08:00
世界 0ef7d902fa Update documentation 2022-11-10 16:33:10 +08:00
世界 2fc1a0a9dd Update documentation 2022-11-10 16:33:10 +08:00
世界 1a9c08292a Add multi user support for hysteria inbound 2022-11-09 21:00:08 +08:00
世界 617aba84e4 Add multi user support for hysteria inbound 2022-11-09 21:00:08 +08:00
世界 f6dcb7b929 Fix h2c transport 2022-11-09 12:15:14 +08:00
世界 5510c474c7 Fix h2c transport 2022-11-09 12:15:14 +08:00
世界 d9d39454a9 Add custom tls client support for std grpc 2022-11-09 11:46:29 +08:00
世界 eb2e8a0b40 Add custom tls client support for std grpc 2022-11-09 11:46:29 +08:00
世界 518b246038 Fix default local DNS server behavior 2022-11-09 10:35:16 +08:00
世界 972491c19d Fix default local DNS server behavior 2022-11-09 10:35:16 +08:00
世界 4367a5d803 Fix vmess request buffer 2022-11-09 10:16:22 +08:00
世界 7358ca4a52 Fix vmess request buffer 2022-11-09 10:16:22 +08:00
世界 95c6c0c795 Update install go script 2022-11-08 23:19:53 +08:00
世界 61c274045a Update install go script 2022-11-08 23:19:53 +08:00
世界 1b12a69120 Fix smux keep alive 2022-11-08 16:45:38 +08:00
世界 f205140b04 Fix smux keep alive 2022-11-08 16:45:38 +08:00
世界 6af7e1e6fa Fix format 2022-11-08 14:54:19 +08:00
世界 1db8e03c86 Fix format 2022-11-08 14:54:19 +08:00
世界 da537d6282 Update patched quic-go 2022-11-08 13:54:01 +08:00
世界 2ecf86c2bc Update patched quic-go 2022-11-08 13:54:01 +08:00
世界 a7d33965cd Add custom wireguard worker size option 2022-11-08 13:48:14 +08:00
世界 999a847e86 Add custom wireguard worker size option 2022-11-08 13:48:14 +08:00
世界 2abbbcfaca Fix reset outbound 2022-11-06 10:36:19 +08:00
世界 1f63ce5dee Fix reset outbound 2022-11-06 10:36:19 +08:00
世界 19fba6f2ff Fix wireguard close 2022-11-06 10:20:23 +08:00
世界 0ad1bbea11 Fix wireguard close 2022-11-06 10:20:23 +08:00
世界 9daa0ca0ae Move WFP manipulation to strict route 2022-11-06 10:16:07 +08:00
世界 b2cd78d279 Move WFP manipulation to strict route 2022-11-06 10:16:07 +08:00
世界 c18f1280c7 Update documentation 2022-11-06 10:16:07 +08:00
世界 d5bb58a0b4 Update documentation 2022-11-06 10:16:07 +08:00
世界 c9325e7847 Split bind_address 2022-11-06 10:16:07 +08:00
世界 7f84936050 Split bind_address 2022-11-06 10:16:07 +08:00
Dreamacroand世界 6d8cf8e8a6 Fix macOS Ventura process name match 2022-11-06 10:16:07 +08:00
Dreamacroand世界 6adfea0a72 Fix macOS Ventura process name match 2022-11-06 10:16:07 +08:00
Hellojackand世界 cb855b3d66 Adjust uTLS wrapper 2022-11-06 10:16:07 +08:00
Hellojackand世界 10f213bf3d Adjust uTLS wrapper 2022-11-06 10:16:07 +08:00
世界 26b4f8bea5 Update documentation 2022-10-31 13:59:52 +08:00
世界 6e8c4f6576 Update documentation 2022-10-31 13:59:52 +08:00
世界 ff9df30773 Fix test 2022-10-31 13:59:52 +08:00
世界 9779dc0154 Fix test 2022-10-31 13:59:52 +08:00
世界 01eb5b723e Fix uTLS config 2022-10-31 13:59:52 +08:00
世界 a2abe31298 Fix uTLS config 2022-10-31 13:59:52 +08:00
世界 bb90e6a193 Update dependencies 2022-10-31 13:59:52 +08:00
世界 930d177dd0 Update dependencies 2022-10-31 13:59:52 +08:00
Fei1Yangand世界 e122c78842 Update container action 2022-10-29 18:01:32 +08:00
Fei1Yangand世界 f3d1b59173 Update container action 2022-10-29 18:01:32 +08:00
世界 2b986968f4 Update documentation 2022-10-29 18:00:05 +08:00
世界 14452f3049 Update documentation 2022-10-29 18:00:05 +08:00
世界 810487e0ed Update dependencies 2022-10-29 17:56:21 +08:00
世界 4119c8647b Update dependencies 2022-10-29 17:56:21 +08:00
世界 b257ad682c Improve local dns transport 2022-10-29 17:37:11 +08:00
世界 90a94a8c63 Improve local dns transport 2022-10-29 17:37:11 +08:00
世界 d897ed59a7 Suppress no network error 2022-10-28 09:54:04 +08:00
世界 b0c39ac7ff Suppress no network error 2022-10-28 09:54:04 +08:00
世界 ec8b0c2a44 Fix decrypt xplus packet 2022-10-28 09:53:57 +08:00
世界 8703e1ff98 Fix decrypt xplus packet 2022-10-28 09:53:57 +08:00
世界 b575903468 Add option for custom wireguard reserved bytes 2022-10-28 09:53:57 +08:00
世界 35886b88d7 Add option for custom wireguard reserved bytes 2022-10-28 09:53:57 +08:00
永雏塔菲and世界 c9732aad8b Add s390x architecture support
* Update debug.yml

Signed-off-by: 永雏塔菲 <108621198+taffychan@users.noreply.github.com>
2022-10-28 09:53:57 +08:00
永雏塔菲and世界 d583b35717 Add s390x architecture support
* Update debug.yml

Signed-off-by: 永雏塔菲 <108621198+taffychan@users.noreply.github.com>
2022-10-28 09:53:57 +08:00
Hellojackand世界 c76f16a3d9 Update uTLS usage
* Update new uTLS fingerprints

* Update documentation
2022-10-28 09:53:57 +08:00
Hellojackand世界 217ffb2f95 Update uTLS usage
* Update new uTLS fingerprints

* Update documentation
2022-10-28 09:53:57 +08:00
世界 b261a90658 Fix v2ray api 2022-10-26 20:06:13 +08:00
世界 22f06f582b Fix v2ray api 2022-10-26 20:06:13 +08:00
世界 a964f887ea Update documentation 2022-10-25 21:26:28 +08:00
世界 f2b5098fa0 Update documentation 2022-10-25 21:26:28 +08:00
世界 d73b79d3af Add go1.18 debug build 2022-10-25 21:25:55 +08:00
世界 0ca3290364 Add go1.18 debug build 2022-10-25 21:25:55 +08:00
世界 26d58849a7 Fix shadowtls conn 2022-10-25 21:25:42 +08:00
世界 43d5b8598b Fix shadowtls conn 2022-10-25 21:25:42 +08:00
世界 7805b719b1 Fix h3 dns transport 2022-10-20 11:04:03 +08:00
世界 f3e1d1defc Fix h3 dns transport 2022-10-20 11:04:03 +08:00
世界 5d3e85274e Fix copy pipe 2022-10-20 10:57:57 +08:00
世界 95c03c9373 Fix copy pipe 2022-10-20 10:57:57 +08:00
世界 a8a0bd7570 Update documentation 2022-10-19 10:55:06 +08:00
世界 7e0958b4ac Update documentation 2022-10-19 10:55:06 +08:00
Skyximand世界 4fe7367ca7 Check destination before udp connect 2022-10-19 10:22:46 +08:00
Skyximand世界 6a26737508 Check destination before udp connect 2022-10-19 10:22:46 +08:00
世界 761e8de937 Fix naive overflow 2022-10-18 17:52:52 +08:00
世界 92a92f39c5 Fix naive overflow 2022-10-18 17:52:52 +08:00
世界 1f82ba56bc Fix DF for hysteria 2022-10-18 17:27:50 +08:00
世界 fc533cd38d Fix DF for hysteria 2022-10-18 17:27:50 +08:00
世界 000af3a5bd Update dependencies 2022-10-18 17:27:50 +08:00
世界 68e286499d Update dependencies 2022-10-18 17:27:50 +08:00
世界 092b839176 Add message for tfo error 2022-10-18 17:27:50 +08:00
世界 f5c1900aad Add message for tfo error 2022-10-18 17:27:50 +08:00
世界 413c4fccb6 Remove strict route on windows
replaced by custom route
2022-10-12 16:24:45 +08:00
世界 6591dd58ca Remove strict route on windows
replaced by custom route
2022-10-12 16:24:45 +08:00
XYenonandGitHub 25a55ebf52 Add custom route support (#147) 2022-10-12 16:20:17 +08:00
XYenonandGitHub 54af113363 Add custom route support (#147) 2022-10-12 16:20:17 +08:00
世界 da70aa1abf Fix sniff fragmented quic client hello 2022-10-12 16:11:42 +08:00
世界 3f1fe814ef Fix sniff fragmented quic client hello 2022-10-12 16:11:42 +08:00
世界 9a6072a048 Remove unused 2022-10-10 14:23:34 +08:00
世界 5a2cebebd1 Remove unused 2022-10-10 14:23:34 +08:00
世界 51e66dd624 Fix tfo headroom 2022-10-10 13:33:48 +08:00
世界 b8009d61b2 Fix tfo headroom 2022-10-10 13:33:48 +08:00
世界 4f34fe636c Add shadowtls inbound test 2022-10-10 11:31:03 +08:00
世界 a61a64bf9e Add shadowtls inbound test 2022-10-10 11:31:03 +08:00
世界 6cb5953bec Add more messages to darwin route error 2022-10-09 21:22:07 +08:00
世界 7d17c52fea Add more messages to darwin route error 2022-10-09 21:22:07 +08:00
世界 dd78c7c365 Fix ssh outbound 2022-10-09 20:43:01 +08:00
世界 f5b15b392b Fix ssh outbound 2022-10-09 20:43:01 +08:00
世界 9d31daea72 Fix uTLS handshake 2022-10-08 20:31:01 +08:00
世界 8a53846efd Fix uTLS handshake 2022-10-08 20:31:01 +08:00
世界 14c192be58 Fix test 2022-10-08 20:30:52 +08:00
世界 badc454452 Fix test 2022-10-08 20:30:52 +08:00
世界 45a59d967d Fix websocket headroom 2022-10-08 20:09:36 +08:00
世界 a01bb569d1 Fix websocket headroom 2022-10-08 20:09:36 +08:00
世界 c2682625e7 Fix interface monitor 2022-10-08 20:09:36 +08:00
世界 89ff9f8368 Fix interface monitor 2022-10-08 20:09:36 +08:00
世界 6b043020b2 Add sniff_timeout 2022-10-08 20:09:36 +08:00
世界 7f816a2ebc Add sniff_timeout 2022-10-08 20:09:36 +08:00
世界 72e1a0ed29 Update documentation 2022-10-06 23:33:57 +08:00
世界 39c141651a Update documentation 2022-10-06 23:33:57 +08:00
世界 87fa65be89 Add shadowtls v2 support 2022-10-06 22:47:11 +08:00
世界 b0ad9bb6f1 Add shadowtls v2 support 2022-10-06 22:47:11 +08:00
世界 c7300b4764 Update tfo-go usage 2022-10-06 21:58:50 +08:00
世界 d135d0f287 Update tfo-go usage 2022-10-06 21:58:50 +08:00
世界 f558552f0e Fix wfp filter weight 2022-10-05 20:24:27 +08:00
世界 b183ccf23d Fix wfp filter weight 2022-10-05 20:24:27 +08:00
世界 e852b8b190 Update documentation 2022-10-03 04:36:54 +08:00
世界 c2969bc186 Update documentation 2022-10-03 04:36:54 +08:00
世界 d87c0c4ad3 Fix check system stack packet 2022-10-03 04:36:54 +08:00
世界 bd86bfcd22 Fix check system stack packet 2022-10-03 04:36:54 +08:00
世界 d04b0a0215 Add v2ray mux support for all connections 2022-10-03 04:34:59 +08:00
世界 8aec64b855 Add v2ray mux support for all connections 2022-10-03 04:34:59 +08:00
世界 65f67b0bee Fix trojan fallback 2022-10-01 11:41:15 +08:00
世界 1445bdba37 Fix trojan fallback 2022-10-01 11:41:15 +08:00
世界 070106e3cc Fix clash tracker 2022-10-01 11:29:46 +08:00
世界 29d08e63b5 Fix clash tracker 2022-10-01 11:29:46 +08:00
世界 70edbb2a39 Improve tls writer 2022-10-01 11:29:46 +08:00
世界 1173fdea64 Improve tls writer 2022-10-01 11:29:46 +08:00
世界 9dd19027d0 Minor fixes 2022-09-30 21:08:07 +08:00
世界 968430c338 Minor fixes 2022-09-30 21:08:07 +08:00
世界 d5f928369c Fix windows route 2022-09-30 00:36:42 +08:00
世界 3e5bee6faf Fix windows route 2022-09-30 00:36:42 +08:00
世界 eafd157dcf Fix dns close 2022-09-29 09:12:13 +08:00
世界 aa613cba73 Fix dns close 2022-09-29 09:12:13 +08:00
世界 1f70aeb6ef Fix random seed 2022-09-29 08:49:34 +08:00
世界 1e510511ae Fix random seed 2022-09-29 08:49:34 +08:00
世界 0ea767a809 Add v2ray stats api 2022-09-29 08:49:34 +08:00
世界 1b44faed17 Add v2ray stats api 2022-09-29 08:49:34 +08:00
世界 d967847370 Add binary to .gitignore 2022-09-26 19:36:51 +08:00
世界 c7a485815c Add binary to .gitignore 2022-09-26 19:36:51 +08:00
世界 6f3ce3049d Add direct io option for clash api 2022-09-26 15:31:02 +08:00
世界 7f9c870bba Add direct io option for clash api 2022-09-26 15:31:02 +08:00
世界 740fbe1647 Fix bind control 2022-09-26 13:50:54 +08:00
世界 b5564ef3d3 Fix bind control 2022-09-26 13:50:54 +08:00
世界 e6e8e02a0f Fix documentation
Signed-off-by: 世界 <i@sekai.icu>
Signed-off-by: unknowndevQwQ <unknowndevQwQ@pm.me>
2022-09-26 12:25:18 +08:00
世界 8ce244dd04 Fix documentation
Signed-off-by: 世界 <i@sekai.icu>
Signed-off-by: unknowndevQwQ <unknowndevQwQ@pm.me>
2022-09-26 12:25:18 +08:00
世界 0815fb648b Update documentation 2022-09-25 22:29:18 +08:00
世界 0f57b93925 Update documentation 2022-09-25 22:29:18 +08:00
世界 69d4d96c2a Refine 4in6 processing 2022-09-25 22:29:18 +08:00
世界 c90a77a185 Refine 4in6 processing 2022-09-25 22:29:18 +08:00
世界 34103a54f7 Fix read source address from grpc-go 2022-09-25 22:29:18 +08:00
世界 c6586f19fa Fix read source address from grpc-go 2022-09-25 22:29:18 +08:00
世界 25b4750c58 Refine tproxy write back 2022-09-25 22:29:18 +08:00
世界 cbab86ae38 Refine tproxy write back 2022-09-25 22:29:18 +08:00
世界 e53ed9c382 Fix shadowsocks plugins 2022-09-25 16:43:12 +08:00
世界 17b5f031f1 Fix shadowsocks plugins 2022-09-25 16:43:12 +08:00
世界 72489195d1 Fix fqdn socks5 outbound connection 2022-09-25 14:42:39 +08:00
世界 b00b6b9e25 Fix fqdn socks5 outbound connection 2022-09-25 14:42:39 +08:00
世界 e0768450fe Fix missing source address from transport connection 2022-09-23 18:55:28 +08:00
世界 fb6b3b0401 Fix missing source address from transport connection 2022-09-23 18:55:28 +08:00
世界 01ee40208d Improve websocket writer 2022-09-23 18:55:07 +08:00
世界 22ea878fe9 Improve websocket writer 2022-09-23 18:55:07 +08:00
世界 f4fda3f508 Add self sign cert support 2022-09-23 17:13:18 +08:00
世界 abe3dc6039 Add self sign cert support 2022-09-23 17:13:18 +08:00
世界 7d0f6da2c3 Add VMess benchmark result 2022-09-23 16:13:29 +08:00
世界 852829b9dc Add VMess benchmark result 2022-09-23 16:13:29 +08:00
世界 01865024b0 Fix leaks and add test 2022-09-23 13:14:31 +08:00
世界 407509c985 Fix leaks and add test 2022-09-23 13:14:31 +08:00
世界 ab7478a80c Update documentation 2022-09-23 10:30:07 +08:00
世界 9856b73cb5 Update documentation 2022-09-23 10:30:07 +08:00
世界 5194db1b80 Fix system stack ipv4 overflow 2022-09-23 10:29:15 +08:00
世界 f42356fbcb Fix system stack ipv4 overflow 2022-09-23 10:29:15 +08:00
世界 7dec07c64a Merge VLESS to library 2022-09-23 10:28:51 +08:00
世界 d0b467671a Merge VLESS to library 2022-09-23 10:28:51 +08:00
世界 cb31607718 Add stdio test 2022-09-23 10:28:24 +08:00
世界 c18c545798 Add stdio test 2022-09-23 10:28:24 +08:00
世界 7a1f1093a7 Update buffer usage 2022-09-23 10:27:48 +08:00
世界 693ef293ac Update buffer usage 2022-09-23 10:27:48 +08:00
世界 80b4b36178 Disable DF on direct outbound by default 2022-09-23 10:27:46 +08:00
世界 a006627795 Disable DF on direct outbound by default 2022-09-23 10:27:46 +08:00
世界 79c794370e Fix url test interval 2022-09-23 10:27:42 +08:00
世界 0738b184e4 Fix url test interval 2022-09-23 10:27:42 +08:00
世界 5545f8c64e Fix dns sniffer 2022-09-17 16:59:28 +08:00
世界 42524ba04e Fix dns sniffer 2022-09-17 16:59:28 +08:00
世界 c732dd75d4 Add mux server and XUDP client for VMess 2022-09-17 11:54:04 +08:00
世界 63fc95b96d Add mux server and XUDP client for VMess 2022-09-17 11:54:04 +08:00
世界 9879d5941b Update documentation 2022-09-16 15:48:31 +08:00
世界 ab436fc137 Update documentation 2022-09-16 15:48:31 +08:00
世界 fe64dd7ee9 Skip bind on local addr 2022-09-16 15:35:29 +08:00
世界 1546770bfd Skip bind on local addr 2022-09-16 15:35:29 +08:00
世界 ad049fc530 Fix tun log 2022-09-16 15:32:50 +08:00
世界 f4b2099488 Fix tun log 2022-09-16 15:32:50 +08:00
世界 825c4fc58b Fix create UDP transport 2022-09-15 16:46:53 +08:00
世界 a2c4d68031 Fix create UDP transport 2022-09-15 16:46:53 +08:00
世界 e440ff8436 Suppress bad http2 error 2022-09-15 15:34:52 +08:00
世界 cfe14f2817 Suppress bad http2 error 2022-09-15 15:34:52 +08:00
世界 481e298df1 Add back urltest outbound 2022-09-15 15:22:08 +08:00
世界 a5402ffb69 Add back urltest outbound 2022-09-15 15:22:08 +08:00
世界 33906955fb Update documentation 2022-09-15 13:25:51 +08:00
世界 4d24cf5ec4 Update documentation 2022-09-15 13:25:51 +08:00
世界 733e275370 Make gVisor optional 2022-09-15 12:24:08 +08:00
世界 668d354771 Make gVisor optional 2022-09-15 12:24:08 +08:00
世界 d36a663be5 Fix clash api proxy type 2022-09-14 23:02:11 +08:00
世界 ad14719b14 Fix clash api proxy type 2022-09-14 23:02:11 +08:00
世界 66a7e5ba25 Fix port rule match logic 2022-09-14 22:03:26 +08:00
世界 d9aa0a67d6 Fix port rule match logic 2022-09-14 22:03:26 +08:00
世界 ea79f075bc Move shadowsocksr implementation to clash 2022-09-14 21:57:40 +08:00
世界 92bf784f4f Move shadowsocksr implementation to clash 2022-09-14 21:57:40 +08:00
世界 cfd6270f5d Fix test 2022-09-14 18:02:51 +08:00
世界 395b13103a Fix test 2022-09-14 18:02:51 +08:00
世界 571b164abb Fix close grpc conn 2022-09-14 18:02:37 +08:00
世界 628cf56d3c Fix close grpc conn 2022-09-14 18:02:37 +08:00
世界 4a6269e033 Add back test workflow 2022-09-14 18:02:37 +08:00
世界 ac5582537f Add back test workflow 2022-09-14 18:02:37 +08:00
世界 de299862b0 Print tags in version command 2022-09-14 18:02:37 +08:00
世界 9aa7a20d96 Print tags in version command 2022-09-14 18:02:37 +08:00
世界 c7d3f264c9 Refactor bind control 2022-09-14 18:02:37 +08:00
世界 189f02c802 Refactor bind control 2022-09-14 18:02:37 +08:00
世界 61b364738c Fix clash store-selected 2022-09-13 17:34:37 +08:00
世界 2373281c41 Fix clash store-selected 2022-09-13 17:34:37 +08:00
世界 771a814610 Redirect clash hello to external ui 2022-09-13 17:29:57 +08:00
世界 e8f4c2d36f Redirect clash hello to external ui 2022-09-13 17:29:57 +08:00
世界 9446232146 Update install go script 2022-09-13 16:24:44 +08:00
世界 07b6db23c1 Update install go script 2022-09-13 16:24:44 +08:00
世界 ff0412529c Fix build on go1.18 2022-09-13 16:23:20 +08:00
世界 9a3360e5d0 Fix build on go1.18 2022-09-13 16:23:20 +08:00
世界 72b2fdfdce Refactor to miekg/dns 2022-09-13 16:18:39 +08:00
世界 007a278ac8 Refactor to miekg/dns 2022-09-13 16:18:39 +08:00
世界 e7f331d3e4 Update documentation 2022-09-13 11:24:33 +08:00
世界 1db7f45370 Update documentation 2022-09-13 11:24:33 +08:00
世界 f11317fe0a Fix concurrent write 2022-09-13 10:41:10 +08:00
世界 b271e19a23 Fix concurrent write 2022-09-13 10:41:10 +08:00
世界andarm64v8a bb39d5955e Skip wait for hysteria tcp handshake response
Co-authored-by: arm64v8a <48624112+arm64v8a@users.noreply.github.com>
2022-09-13 10:40:26 +08:00
世界andarm64v8a 79b6bdfda1 Skip wait for hysteria tcp handshake response
Co-authored-by: arm64v8a <48624112+arm64v8a@users.noreply.github.com>
2022-09-13 10:40:26 +08:00
世界 581fc4cd33 Add vless outbound and xudp 2022-09-12 21:59:27 +08:00
世界 38088f28b0 Add vless outbound and xudp 2022-09-12 21:59:27 +08:00
世界 6efce450dd Fix hysteria inbound 2022-09-12 18:35:36 +08:00
世界 dfb8b5f2fa Fix hysteria inbound 2022-09-12 18:35:36 +08:00
世界 f5b00ac9de Add shadowsocksr outbound 2022-09-12 18:35:36 +08:00
世界 9913e0e025 Add shadowsocksr outbound 2022-09-12 18:35:36 +08:00
世界 29934e62f4 Add obfs-local and v2ray-plugin support for shadowsocks outbound 2022-09-12 14:55:00 +08:00
世界 ce567ffdde Add obfs-local and v2ray-plugin support for shadowsocks outbound 2022-09-12 14:55:00 +08:00
世界 d0e44b7ba6 Fix socks4 client 2022-09-12 11:33:38 +08:00
世界 5a9913eca5 Fix socks4 client 2022-09-12 11:33:38 +08:00
世界 28a04e7514 Update documentation 2022-09-11 22:48:42 +08:00
世界 eaf1ace681 Update documentation 2022-09-11 22:48:42 +08:00
世界 3c08184274 Add custom tls client support for v2ray h2/grpclite transports 2022-09-11 22:44:35 +08:00
世界 a2d1f89922 Add custom tls client support for v2ray h2/grpclite transports 2022-09-11 22:44:35 +08:00
世界 faabd50be8 Minor fixes 2022-09-11 22:44:35 +08:00
世界 7e09beb0c3 Minor fixes 2022-09-11 22:44:35 +08:00
世界 9fb9047fdf Update documentation 2022-09-10 23:31:07 +08:00
世界 ebf5cbf1b9 Update documentation 2022-09-10 23:31:07 +08:00
世界 9d647e97e5 Run build on main branch 2022-09-10 22:54:53 +08:00
世界 d727710d60 Run build on main branch 2022-09-10 22:54:53 +08:00
世界 9f268f8d43 Fix socks4 request 2022-09-10 22:54:50 +08:00
世界 0e31aeea00 Fix socks4 request 2022-09-10 22:54:50 +08:00
世界 c264d14113 Add uTLS client 2022-09-10 22:10:45 +08:00
世界 2f437a0382 Add uTLS client 2022-09-10 22:10:45 +08:00
世界 421f4d012f Add ECH TLS client 2022-09-10 22:10:45 +08:00
世界 3ad4370fa5 Add ECH TLS client 2022-09-10 22:10:45 +08:00
世界 fe3e01c499 Import cloudflare tls 2022-09-10 22:10:45 +08:00
世界 a3bb9c2877 Import cloudflare tls 2022-09-10 22:10:45 +08:00
世界 6e7d31a989 Refactor TLS 2022-09-10 22:10:45 +08:00
世界 ee7e976084 Refactor TLS 2022-09-10 22:10:45 +08:00
世界 755d187ce1 Add clash persistence support 2022-09-10 14:42:14 +08:00
世界 099358d3e5 Add clash persistence support 2022-09-10 14:42:14 +08:00
世界 a62774c51c Add clash mode support 2022-09-10 14:15:11 +08:00
世界 5297273937 Add clash mode support 2022-09-10 14:15:11 +08:00
世界 3c4d71ff39 Fix processing empty dns result 2022-09-10 14:15:11 +08:00
世界 80cfc9a25b Fix processing empty dns result 2022-09-10 14:15:11 +08:00
世界 1ed23a5ea3 Fix tun documentation 2022-09-10 10:21:42 +08:00
世界 2ae4da524e Fix tun documentation 2022-09-10 10:21:42 +08:00
世界 69b61afc54 Fix system stack crash 2022-09-09 19:44:13 +08:00
世界 bbe7f28545 Fix system stack crash 2022-09-09 19:44:13 +08:00
世界 d6506a4062 Fix no_gvisor build 2022-09-09 19:44:13 +08:00
世界 78ddd497ee Fix no_gvisor build 2022-09-09 19:44:13 +08:00
世界 4f761262ee Update documentation 2022-09-09 15:42:33 +08:00
世界 8d044232af Update documentation 2022-09-09 15:42:33 +08:00
世界 67536d05b1 Update dependencies
Add half close for smux
Update gVisor to 20220905.0
2022-09-09 14:44:18 +08:00
世界 aa7e85caa7 Update dependencies
Add half close for smux
Update gVisor to 20220905.0
2022-09-09 14:44:18 +08:00
zakuwakiand世界 a1846d72a5 Optional proxyproto header 2022-09-09 14:44:18 +08:00
zakuwakiand世界 46a8f24400 Optional proxyproto header 2022-09-09 14:44:18 +08:00
世界 a9e9715b11 Add comment filter for config 2022-09-09 14:44:18 +08:00
世界 87bc292296 Add comment filter for config 2022-09-09 14:44:18 +08:00
世界 178e86fc50 Add system tun stack 2022-09-09 14:44:18 +08:00
世界 ac539ace70 Add system tun stack 2022-09-09 14:44:18 +08:00
世界 a703d513a6 Set default tun mtu to 9000 like clash
IDK why, maybe faster in a local speed test?
2022-09-09 14:44:18 +08:00
世界 a15b13978f Set default tun mtu to 9000 like clash
IDK why, maybe faster in a local speed test?
2022-09-09 14:44:18 +08:00
世界 c348f3431b Set udp dontfrag by default 2022-09-09 14:44:18 +08:00
世界 0c975db0a6 Set udp dontfrag by default 2022-09-09 14:44:18 +08:00
世界 01d4d3d482 Refactor wireguard & add tun support 2022-09-09 14:44:18 +08:00
世界 cb4fea0240 Refactor wireguard & add tun support 2022-09-09 14:44:18 +08:00
世界 83e4c65d01 Add support for use with android VPNService 2022-09-09 14:44:18 +08:00
世界 8e7957d440 Add support for use with android VPNService 2022-09-09 14:44:18 +08:00
世界 a72e18bac2 Bump version 2022-09-09 14:43:42 +08:00
世界 f7bed32c6f Bump version 2022-09-09 14:43:42 +08:00
世界 138756d638 Fix match 4in6 address in ip_cidr 2022-09-09 14:07:02 +08:00
世界 ef7f2d82c0 Fix match 4in6 address in ip_cidr 2022-09-09 14:07:02 +08:00
世界 64db6e9d64 Fix documentation 2022-09-09 13:54:02 +08:00
世界 7aa97a332e Fix documentation 2022-09-09 13:54:02 +08:00
世界 1ccc37694b Minor fixes 2022-09-08 18:33:59 +08:00
世界 7c30dde96b Minor fixes 2022-09-08 18:33:59 +08:00
GyDiandGitHub 956445435e Fix clashapi log level format error 2022-09-08 18:04:06 +08:00
GyDiandGitHub 9cef2a0a8f Fix clashapi log level format error 2022-09-08 18:04:06 +08:00
世界 e53e408fa8 Update documentation 2022-09-07 23:10:36 +08:00
世界 f376683fc3 Update documentation 2022-09-07 23:10:36 +08:00
世界 d77c26ed0d Fix hysteria stream error 2022-09-07 19:16:20 +08:00
世界 4b61d6e875 Fix hysteria stream error 2022-09-07 19:16:20 +08:00
世界 78519abb66 Refine test 2022-09-07 19:16:20 +08:00
世界 7d83e350fd Refine test 2022-09-07 19:16:20 +08:00
世界 888dd95d44 Fix processing vmess termination signal 2022-09-07 19:16:20 +08:00
世界 500ba69548 Fix processing vmess termination signal 2022-09-07 19:16:20 +08:00
世界 d3d4a6e88f Fix json format error message 2022-09-07 13:23:26 +08:00
世界 9a422549b1 Fix json format error message 2022-09-07 13:23:26 +08:00
世界 2b064ee395 Fix naive inbound temporary 2022-09-07 12:30:54 +08:00
世界 3b48fa455e Fix naive inbound temporary 2022-09-07 12:30:54 +08:00
zakuwakiand世界 4f772b014e Suppress accept proxyproto failed #65 2022-09-06 23:16:31 +08:00
zakuwakiand世界 ef013e0639 Suppress accept proxyproto failed #65 2022-09-06 23:16:31 +08:00
世界 db43deed77 Fix wireguard reconnect 2022-09-06 00:11:43 +08:00
世界 8f8437a88d Fix wireguard reconnect 2022-09-06 00:11:43 +08:00
世界 956c70c65e Update documentation 2022-09-04 13:15:10 +08:00
世界 1b091c9b07 Update documentation 2022-09-04 13:15:10 +08:00
世界 90407bab12 Fix DNS routing 2022-09-04 12:49:38 +08:00
世界 4801b6f057 Fix DNS routing 2022-09-04 12:49:38 +08:00
世界 fa9450da1e Fix write trojan udp 2022-09-03 16:58:55 +08:00
世界 9078bc2de5 Fix write trojan udp 2022-09-03 16:58:55 +08:00
世界 baa3c2f735 Update documentation for dial fields 2022-09-03 13:02:41 +08:00
世界 b69464dfe9 Update documentation for dial fields 2022-09-03 13:02:41 +08:00
世界 273652ae23 Merge dialer options 2022-09-03 12:55:10 +08:00
世界 62fa48293a Merge dialer options 2022-09-03 12:55:10 +08:00
世界 e290aaaf5c Fix dial parallel in direct outbound 2022-09-03 12:01:48 +08:00
世界 b206d0889b Fix dial parallel in direct outbound 2022-09-03 12:01:48 +08:00
世界 dd1f222840 Fix write zero 2022-09-03 09:25:30 +08:00
世界 ee691d81bf Fix write zero 2022-09-03 09:25:30 +08:00
void aire()and世界 c22d4a85c0 Fix documentation typo (#60) 2022-09-02 19:04:03 +08:00
void aire()and世界 56876a67cc Fix documentation typo (#60) 2022-09-02 19:04:03 +08:00
世界 65df98a60d Add ws compatibility test 2022-09-01 20:32:47 +08:00
世界 4a0df713aa Add ws compatibility test 2022-09-01 20:32:47 +08:00
世界 77bb8c2ae8 Fix server install script 2022-09-01 20:32:47 +08:00
世界 ef801cbfbe Fix server install script 2022-09-01 20:32:47 +08:00
世界 0c331b5fea Add with_wireguard to default server tag 2022-09-01 20:16:20 +08:00
世界 9378fc88d2 Add with_wireguard to default server tag 2022-09-01 20:16:20 +08:00
世界 97de31e957 Move unstable branch to dev-next 2022-08-31 23:45:42 +08:00
世界 f46bfcc3d8 Move unstable branch to dev-next 2022-08-31 23:45:42 +08:00
0x7d274284andGitHub 9bc37de02c Fix documentation typo (#57) 2022-08-31 23:42:36 +08:00
0x7d274284andGitHub ccdb238843 Fix documentation typo (#57) 2022-08-31 23:42:36 +08:00
世界 4f805ce45f Fix install documentation 2022-08-31 23:37:30 +08:00
世界 f1f61b4e2b Fix install documentation 2022-08-31 23:37:30 +08:00
世界 abbff39758 Fix write log timestamp 2022-08-31 23:35:43 +08:00
世界 a44cb745d9 Fix write log timestamp 2022-08-31 23:35:43 +08:00
世界 457f13639a Update documentation 2022-08-31 14:34:32 +08:00
世界 f5f5cb023c Update documentation 2022-08-31 14:34:32 +08:00
世界andGitHub 73746383cc Add shadowtls (#49)
* Add shadowtls outbound

* Add shadowtls inbound

* Add shadowtls example

* Add shadowtls documentation
2022-08-31 14:21:53 +08:00
世界andGitHub 5813e0ce7a Add shadowtls (#49)
* Add shadowtls outbound

* Add shadowtls inbound

* Add shadowtls example

* Add shadowtls documentation
2022-08-31 14:21:53 +08:00
dyhkwongandGitHub 917c4f0e91 darwin pf support (#52) 2022-08-31 14:21:37 +08:00
dyhkwongandGitHub 5a9c2b1e80 darwin pf support (#52) 2022-08-31 14:21:37 +08:00
世界 5fe5646b6f Refactor outbound documentation 2022-08-31 13:42:30 +08:00
世界 bda34fdb3b Refactor outbound documentation 2022-08-31 13:42:30 +08:00
世界 cb523dd454 Fix process_name rule item 2022-08-31 12:51:38 +08:00
世界 426b677eb8 Fix process_name rule item 2022-08-31 12:51:38 +08:00
世界 ced67719a9 Refactor inbound documetation 2022-08-31 12:50:26 +08:00
世界 67c7e9fd86 Refactor inbound documetation 2022-08-31 12:50:26 +08:00
世界 421b3ba7a6 Fix smux session status 2022-08-31 10:00:15 +08:00
世界 d8028a8632 Fix smux session status 2022-08-31 10:00:15 +08:00
dyhkwongandGitHub 664c6b68b6 Add process_path rule item (#51)
* process matching supports full path
* Remove strings.ToLower
2022-08-30 10:44:40 +08:00
dyhkwongandGitHub 374743d022 Add process_path rule item (#51)
* process matching supports full path
* Remove strings.ToLower
2022-08-30 10:44:40 +08:00
世界 38a69dac07 Fix socksaddr type condition 2022-08-29 19:58:58 +08:00
世界 cd98ea5008 Fix socksaddr type condition 2022-08-29 19:58:58 +08:00
世界 56119da3e0 Add chained inbound support 2022-08-29 19:50:28 +08:00
世界 dbda0ed98a Add chained inbound support 2022-08-29 19:50:28 +08:00
世界 1c6d039e3f Fix inject conn 2022-08-29 19:02:41 +08:00
世界 f5e0ead01c Fix inject conn 2022-08-29 19:02:41 +08:00
0x7d274284andGitHub 06cd8f8117 Fix issue template (#48)
The correct command to get the version is `sing-box version`
2022-08-29 16:52:15 +08:00
0x7d274284andGitHub 44818701bc Fix issue template (#48)
The correct command to get the version is `sing-box version`
2022-08-29 16:52:15 +08:00
世界 a008f5f117 Fix search android package in non-owner users 2022-08-29 12:02:29 +08:00
世界 e0f7387dff Fix search android package in non-owner users 2022-08-29 12:02:29 +08:00
世界 c4a7d8d209 Add grpc compatibility test 2022-08-29 10:15:25 +08:00
世界 d440a01792 Add grpc compatibility test 2022-08-29 10:15:25 +08:00
世界 4ae78c2db8 Fix log item on document menu 2022-08-28 12:47:23 +08:00
世界 665c84ee42 Fix log item on document menu 2022-08-28 12:47:23 +08:00
HellojackandGitHub 78a363ba05 Minor fixes (#45)
* Cleanup code
* Fix documentation typo
2022-08-28 12:40:44 +08:00
HellojackandGitHub e0de96eb4c Minor fixes (#45)
* Cleanup code
* Fix documentation typo
2022-08-28 12:40:44 +08:00
世界 301512ee4b Update dependencies 2022-08-28 12:21:22 +08:00
世界 c6ef276811 Update dependencies 2022-08-28 12:21:22 +08:00
世界 7d608c54e6 Add docker image 2022-08-28 00:23:41 +08:00
世界 1701aaf78c Add docker image 2022-08-28 00:23:41 +08:00
世界 9dc003c87b Simplify server installation 2022-08-28 00:23:41 +08:00
世界 122daa4bfb Simplify server installation 2022-08-28 00:23:41 +08:00
世界 0e1502ca6c Update documentation 2022-08-28 00:23:41 +08:00
世界 561a9e5275 Update documentation 2022-08-28 00:23:41 +08:00
HellojackandGitHub 077969c709 Add gun-lite gRPC implementation (#44) 2022-08-27 21:05:15 +08:00
HellojackandGitHub de2453fce9 Add gun-lite gRPC implementation (#44) 2022-08-27 21:05:15 +08:00
世界 c169f1b0c7 Fix sniff override destination 2022-08-27 14:37:14 +08:00
世界 d59d40c118 Fix sniff override destination 2022-08-27 14:37:14 +08:00
rand0mgh0standGitHub efff61021c Fix documentation for socks inbound (#42) 2022-08-27 13:16:04 +08:00
rand0mgh0standGitHub 3469df001f Fix documentation for socks inbound (#42) 2022-08-27 13:16:04 +08:00
世界 56e0ffeb3a Add vmess packetaddr option 2022-08-27 11:28:01 +08:00
世界 0d8cfa3031 Add vmess packetaddr option 2022-08-27 11:28:01 +08:00
世界 4df3843d86 Add documentation for strict_route 2022-08-27 09:31:17 +08:00
世界 0289586880 Add documentation for strict_route 2022-08-27 09:31:17 +08:00
rand0mgh0standGitHub a5d04de985 docs-zh-CN: use English for License section (#40) 2022-08-26 23:21:32 +08:00
rand0mgh0standGitHub e46427c7fc docs-zh-CN: use English for License section (#40) 2022-08-26 23:21:32 +08:00
世界 731e7fab95 Move documentation branch to main 2022-08-26 21:53:46 +08:00
世界 3ea59d9a8e Move documentation branch to main 2022-08-26 21:53:46 +08:00
世界 bfcf1017f0 Add strict_route option 2022-08-26 21:53:08 +08:00
世界 e85dfc6adf Add strict_route option 2022-08-26 21:53:08 +08:00
世界 a0d35cf3dc Fix dns hijack on android
iproute2 on android does not support port rules
2022-08-26 21:05:45 +08:00
世界 d0703b78fa Fix dns hijack on android
iproute2 on android does not support port rules
2022-08-26 21:05:45 +08:00
世界 1e596c25b1 Fix TLS documentation 2022-08-26 18:36:56 +08:00
世界 432e6adf3e Fix TLS documentation 2022-08-26 18:36:56 +08:00
世界 0bcd2df9c6 Revert linux process searcher 2022-08-26 17:36:06 +08:00
世界 a057754035 Revert linux process searcher 2022-08-26 17:36:06 +08:00
世界 f320a584f6 Initial release 2022-08-26 16:40:37 +08:00
世界 0348ace253 Initial release 2022-08-26 16:40:37 +08:00
世界 4ea259a94f Fix read DNS message 2022-08-26 13:35:27 +08:00
世界 c5e38203eb Fix read DNS message 2022-08-26 13:35:27 +08:00
世界 330826f597 Fix ipv6 route on linux 2022-08-26 12:30:31 +08:00
世界 9ac31d0233 Fix ipv6 route on linux 2022-08-26 12:30:31 +08:00
世界 b0d01c209e Update documentation 2022-08-26 11:10:02 +08:00
世界 9d8d1cd69d Update documentation 2022-08-26 11:10:02 +08:00
世界 8584538e81 Cleanup vmessws 2022-08-26 10:22:29 +08:00
世界 07a0381f8b Cleanup vmessws 2022-08-26 10:22:29 +08:00
世界 c015310ddb Cleanup vmesshttp 2022-08-26 08:41:45 +08:00
世界 f841459004 Cleanup vmesshttp 2022-08-26 08:41:45 +08:00
世界 477a730322 Update documentation 2022-08-25 22:49:23 +08:00
世界 78a26fc139 Update documentation 2022-08-25 22:49:23 +08:00
世界 b05ead5709 Improve ip_cidr rule 2022-08-25 22:23:26 +08:00
世界 9f6628445e Improve ip_cidr rule 2022-08-25 22:23:26 +08:00
世界 82cd08371a Add contributing documentation 2022-08-25 21:08:29 +08:00
世界 fa017b5977 Add contributing documentation 2022-08-25 21:08:29 +08:00
世界 9c7910e75c Fix route connections 2022-08-25 20:48:59 +08:00
世界 58f4a970f2 Fix route connections 2022-08-25 20:48:59 +08:00
世界 273a6b6ad5 Fix ipv6 route on linux 2022-08-25 18:57:36 +08:00
世界 021aa8faed Fix ipv6 route on linux 2022-08-25 18:57:36 +08:00
世界 cc353e0d81 Fix http proxy with compressed response 2022-08-25 18:40:13 +08:00
世界 83f6e037d6 Fix http proxy with compressed response 2022-08-25 18:40:13 +08:00
世界 361076a5d5 Fix issue template 2022-08-25 18:40:13 +08:00
世界 baf153434d Fix issue template 2022-08-25 18:40:13 +08:00
世界 8f67ed0750 Fix bind_address 2022-08-25 14:50:10 +08:00
世界 d481bd7993 Fix bind_address 2022-08-25 14:50:10 +08:00
Steven TangandGitHub 9d151eb86a Fix typo in features.md (#32) 2022-08-25 13:42:22 +08:00
Steven TangandGitHub e859c0a6ef Fix typo in features.md (#32) 2022-08-25 13:42:22 +08:00
zakuwakiand世界 cd29049889 Add trojan fallback for ALPN #31 2022-08-25 13:37:32 +08:00
zakuwakiand世界 59a39e66b1 Add trojan fallback for ALPN #31 2022-08-25 13:37:32 +08:00
世界 66e51c5bfb Let vmess use zero instead of auto if TLS enabled 2022-08-25 11:51:17 +08:00
世界 fd5ac69a35 Let vmess use zero instead of auto if TLS enabled 2022-08-25 11:51:17 +08:00
世界 b5d4b267e2 Suppress expected error 2022-08-25 11:02:27 +08:00
世界 9af746ba2f Remove TLS requirement on gRPC server 2022-08-25 10:52:16 +08:00
世界 6b7e9f7949 Close websocket conn gracefully 2022-08-25 10:46:14 +08:00
世界 df073989d2 Add stale workflow 2022-08-25 10:24:11 +08:00
世界 d3e6be3980 Update documentation 2022-08-25 10:04:51 +08:00
ReeceandGitHub c5bee2c2a2 Fix zh-CN document symbol and format (#29) 2022-08-25 09:45:22 +08:00
世界 de944ef795 Initial zh-CN document translation: outbound 2022-08-24 21:02:28 +08:00
世界 a6a3038fd0 Fix early close on windows and catch any 2022-08-24 19:03:15 +08:00
世界 41d9c0d23a Initial zh-CN document translation: inbound 2022-08-24 18:43:39 +08:00
世界 52107ffa56 Initial zh-CN document translation: shared 2022-08-24 17:39:37 +08:00
世界 d0fc15ca54 Add ACME EAB support 2022-08-24 17:06:28 +08:00
世界 7d7acacaf5 Initial zh-CN document translation: route 2022-08-24 16:56:29 +08:00
世界 484f0bb567 Initial zh-CN document translation: DNS 2022-08-24 16:37:06 +08:00
HellojackandGitHub 76f41e5731 Fix TLS insecure (#27) 2022-08-24 16:11:41 +08:00
世界 5732c92943 Fix close non-duplex connections 2022-08-24 14:32:18 +08:00
世界 71c7f4b35d Initial zh-CN document translation: examples 2022-08-24 13:14:12 +08:00
世界 596a34fe2c Initial zh-CN document translation: FAQ 2022-08-24 13:04:47 +08:00
世界 336d9485c4 Initial zh-CN document translation 2022-08-24 12:45:51 +08:00
世界 a1223ce227 Fix unix search path 2022-08-24 12:27:36 +08:00
世界 91cc9534d2 Fix naive padding 2022-08-24 10:21:56 +08:00
世界 1b0f135d7c Update documentation 2022-08-24 00:39:25 +08:00
世界 4eec66d21b Check configuration before reload 2022-08-23 23:44:44 +08:00
世界 a69eddc618 Add proxy protocol support 2022-08-23 21:07:35 +08:00
世界 fe25c4b2dd Handle SIGHUP signal 2022-08-23 19:56:28 +08:00
世界 7288d74b8d Parse X-Forward-For in HTTP requests 2022-08-23 19:53:04 +08:00
世界 b7f61e0993 Fix test naive inbound with nginx 2022-08-23 14:41:31 +08:00
世界 1078439201 Accept HTTP1 in naive inbound 2022-08-23 13:25:03 +08:00
世界 227a6e9921 Add v2ray transport to trojan 2022-08-23 13:24:52 +08:00
世界 fd625f4485 Free memory after start 2022-08-22 23:17:08 +08:00
世界 10a202eb85 Allow http1 in v2ray HTTP transport 2022-08-22 23:02:25 +08:00
世界 46ed01b4c9 Add v2ray HTTP transport 2022-08-22 22:20:19 +08:00
世界 192c360801 Add v2ray QUIC transport 2022-08-22 22:20:19 +08:00
世界 ebc3c54618 Add v2ray WebSocket transport 2022-08-22 22:20:18 +08:00
世界 dbf12fb14d Prepare v2ray client/server transport 2022-08-22 18:57:05 +08:00
世界 fbda05239d Fix clash server early close 2022-08-22 16:33:33 +08:00
世界 68f4a744df Minor fixes 2022-08-22 16:14:53 +08:00
世界 515b350328 Apply bind address to udp connect 2022-08-22 14:35:05 +08:00
世界 6e41cc18f1 Add bind address to outbound options 2022-08-22 14:28:23 +08:00
世界 b6125cb585 Update documentation 2022-08-22 14:19:32 +08:00
世界 045e6d1976 Fix tests 2022-08-22 12:02:16 +08:00
世界 6109040c4c Add strategy setting for each dns server 2022-08-22 12:01:50 +08:00
世界 e18acc7db9 Fix vectorised writer 2022-08-21 22:35:58 +08:00
世界 9ac5648eb8 Add ssh outbound 2022-08-21 22:30:48 +08:00
世界 e883ed3681 Add FAQ page 2022-08-21 22:26:08 +08:00
世界 c2f1cb07af Update release config 2022-08-21 13:03:19 +08:00
世界 f6e163efd7 Fix gvisor udp write back 2022-08-21 11:40:04 +08:00
世界 990a80c2d3 Add tor outbound 2022-08-21 01:06:34 +08:00
世界 0686ad25fd Fix typo in documentation 2022-08-20 21:16:14 +08:00
世界 fb03bb3edd Add trojan connection fallback 2022-08-20 21:08:53 +08:00
世界 53ce452767 Wait a second before check route update 2022-08-20 13:42:28 +08:00
世界 a5f0041cf6 Skip bind connection with private destination to interface 2022-08-20 13:31:15 +08:00
世界 3f41b14d3b Fix write socks5 username password auth request 2022-08-20 13:26:49 +08:00
世界 7909d58f86 Improve process searcher 2022-08-20 12:11:27 +08:00
世界 dcdf6fae31 Fix route on android 2022-08-20 10:27:13 +08:00
世界 a3ce808911 Start outbounds before router 2022-08-20 09:13:00 +08:00
世界 27392068ae Fix read packages in android 13 2022-08-20 03:05:50 +08:00
世界 781952ab3c Attempt to unwrap ip-in-fqdn socksaddr 2022-08-20 00:01:08 +08:00
世界 f3b372a7d0 Update documentation 2022-08-19 22:30:12 +08:00
世界 2cbdc0354f Fix acme issuer 2022-08-19 18:42:12 +08:00
世界 bd88c48b11 Add with_acme to server scripts 2022-08-19 17:48:56 +08:00
世界 467065951c Update gVisor to 20220815.0 2022-08-19 17:47:54 +08:00
世界 cbbdd5bed5 Allow read config from stdin 2022-08-19 15:43:13 +08:00
世界andGitHub 9bfef39b32 Add hysteria and acme TLS certificate issuer (#18)
* Add hysteria client/server
* Add acme TLS certificate issuer
2022-08-19 15:42:57 +08:00
世界 d854a567cc Add back dns concurrent write lock 2022-08-19 10:51:26 +08:00
世界 7fb6788547 Fix darwin tun 2022-08-19 08:35:08 +08:00
世界 6522c0affb Fix log to file 2022-08-19 08:26:26 +08:00
世界 4044d41e0f Fix format 2022-08-19 08:26:26 +08:00
世界 1b261e843c Add write lock to shadowsocks aead writer 2022-08-19 08:26:26 +08:00
世界 d4dcd879ec Fix close shadowsocks server conn 2022-08-18 23:16:05 +08:00
世界 83860510fd Fix find process with lwip stack 2022-08-18 10:10:30 +08:00
Tianling ShenandGitHub e9e002dc67 Fix geosite path (#17)
`geoIPOptions` -> `geositeOptions`

Signed-off-by: Tianling Shen <i@cnsztl.eu.org>
2022-08-18 10:00:56 +08:00
世界 ae1e78b409 Fix lint 2022-08-17 20:15:35 +08:00
世界 e0aaddfe45 Improve async dns transports 2022-08-17 20:10:59 +08:00
世界 dbca1fc507 Update documentation 2022-08-17 15:19:10 +08:00
世界 90328934f3 Add ip_version rule item 2022-08-16 23:47:14 +08:00
世界 1ef9449ca0 Add wireguard outbound and test 2022-08-16 23:39:11 +08:00
世界 0e38106312 Improve tproxy udp write back 2022-08-16 18:37:37 +08:00
世界 26e0c91fe3 Update exec/control usage 2022-08-16 18:19:48 +08:00
世界 29a9b1b84a Fix include_android_user option 2022-08-16 12:16:59 +08:00
世界 32b1fc67f1 Fix copy stream 2022-08-15 16:53:12 +08:00
世界 be04eb3bea Add android package rules support in tun routing 2022-08-15 11:44:59 +08:00
世界 91fd4bacbd Add uid and android user rules support in tun routing 2022-08-15 11:41:00 +08:00
世界 740eb96fa8 Improve cmd 2022-08-13 18:37:51 +08:00
HellojackandGitHub ce02da8698 Fix documentation typo (#13) 2022-08-13 11:01:22 +08:00
世界 f215b21d51 Fix dns concurrent write 2022-08-13 11:00:15 +08:00
世界 c1dad92914 Improve build 2022-08-12 22:58:28 +08:00
世界 86bfe052ac Add UoT option to socks outbound too 2022-08-12 17:55:52 +08:00
世界 0a84f60c32 Improve smux write 2022-08-12 16:49:25 +08:00
HellojackandGitHub 8421a979b4 Add CGO hint in version cmd (#12) 2022-08-12 15:46:26 +08:00
世界 0905d87cc8 Minor fixes 2022-08-12 12:13:57 +08:00
世界 de9fe64751 Update dependencies 2022-08-12 10:58:16 +08:00
世界 cc5440aa67 Refactor bufio 2022-08-11 23:59:22 +08:00
世界 aa0cd04622 Show memory stats in debug 2022-08-11 12:42:17 +08:00
世界 e733bfb803 Enable QUIC in server scripts 2022-08-11 11:45:33 +08:00
世界 1a34319c95 Add back UoT support 2022-08-11 10:36:28 +08:00
ReeceandGitHub 2e675c2808 Fix documentation typo (#10) 2022-08-11 10:06:10 +08:00
世界 0441d2cdd7 Update documentation 2022-08-10 21:21:02 +08:00
世界 312d89980b Add naive inbound and test 2022-08-10 20:36:29 +08:00
iKirbyandGitHub 6d5d74e011 Fix default dns server option (#9) 2022-08-10 12:18:03 +08:00
世界 daca216fe4 Remove incorrect warning 2022-08-09 17:27:22 +08:00
世界 ae40258f87 Update dependencies 2022-08-09 15:55:16 +08:00
世界 266416183e Improve cmd 2022-08-09 14:49:17 +08:00
世界 c0c91cd191 Fix direct connect 2022-08-09 14:48:08 +08:00
世界 25cbcafb90 Improve wintun read 2022-08-08 21:35:59 +08:00
世界 3594fd4593 Update documentation 2022-08-08 21:10:37 +08:00
世界 c95e23d755 Fix copy early conn 2022-08-08 20:56:53 +08:00
世界 769521cafe Add trojan inbound/outbound 2022-08-08 09:08:12 +08:00
世界 6e057a3318 Simplify vmess test 2022-08-08 09:08:12 +08:00
世界 70842ad0ac Fix mux overflow 2022-08-08 08:09:17 +08:00
世界 37771a57e7 Add optional LWIP tun stack support 2022-08-07 17:21:49 +08:00
世界 44732053d0 Update gVisor to 20220801.0 2022-08-07 14:58:07 +08:00
世界 2d6546705a Fix linux unprivileged tun usage 2022-08-07 11:21:10 +08:00
世界 93fb7aa371 Fix wininet wrapper 2022-08-06 17:28:51 +08:00
世界 02832fb136 Add tun support for macOS 2022-08-05 17:02:51 +08:00
世界 ed900a990e Add set system proxy support for macOS 2022-08-05 16:55:59 +08:00
世界 ed32fa60df Add multiplexer for vmess 2022-08-04 10:38:20 +08:00
世界 a6e5654436 Improve multiplex log 2022-08-04 09:12:57 +08:00
世界 ae73634640 Add unsafe tag to multiplexer writer 2022-08-04 00:00:22 +08:00
世界 86442662ea Add documentation for simple linux installation 2022-08-03 22:23:40 +08:00
世界 cc17627a0b Improve multiplexer 2022-08-03 22:01:18 +08:00
世界 b1fa60eabc Improve dns log 2022-08-03 20:17:05 +08:00
世界 07eff298ab Update WriteToUDPAddrPort usage since fixed by go1.18.5 2022-08-03 17:49:04 +08:00
世界 575dce6fb0 Update task usage 2022-08-03 17:44:19 +08:00
世界 5c756f9000 Replace netlink with fork 2022-08-03 12:02:22 +08:00
世界 56e63609c6 Fix windows tun leak memory 2022-08-03 10:14:00 +08:00
世界 cf425de106 Minor fixes 2022-08-02 18:47:23 +08:00
世界 49f4145b23 Improve mux server 2022-08-02 15:11:51 +08:00
世界 4ecb7d2c04 Fix buffer usage 2022-08-02 13:43:25 +08:00
世界 ffec06e730 Fix dns sniff 2022-08-02 13:42:31 +08:00
世界 c7a9272113 Add documentation for vmess 2022-08-01 17:02:13 +08:00
世界 d0c9fdcf66 Add vmess legacy server and test 2022-08-01 12:23:34 +08:00
世界 15c8853f66 Fix netlink subscription leak 2022-07-31 19:58:32 +08:00
世界 9fbaff4b23 Make socks request buffered 2022-07-31 19:58:32 +08:00
世界 2a0499d8fc Close tun endpoint faster 2022-07-31 19:58:32 +08:00
世界 fb16f5a2d6 Add retry for mux stream open 2022-07-31 18:08:24 +08:00
世界 1c50521985 Fix tcp keep alive 2022-07-31 09:53:29 +08:00
世界 770e58a79d Fix dns outbound 2022-07-31 08:48:56 +08:00
世界 d182ec0430 Add omitempty for listen_port 2022-07-30 22:05:06 +08:00
世界 235d9ec12a Add TLS certificate reload 2022-07-30 22:04:01 +08:00
世界 e0eaae9b69 Add documentation for shadowsocks multiplexer 2022-07-30 21:23:45 +08:00
世界 0dedbbf37a Fix copy with src buffer to headroom writer 2022-07-30 21:23:45 +08:00
世界 ee6f271456 Minor fixes 2022-07-30 14:50:33 +08:00
世界 81fc09d190 Improve error processing 2022-07-30 09:57:02 +08:00
世界 336bceeb97 Add linux server scripts 2022-07-30 09:04:01 +08:00
世界 1570c3b6f5 Use connect for quic/dns udp connections 2022-07-30 09:04:01 +08:00
世界 10531c9f9a Add multiplexer 2022-07-30 09:04:01 +08:00
世界 8e8b1b974e Hide dns outbound in clash-dashboard 2022-07-28 16:40:06 +08:00
世界 806ec58d43 Remove urltest outbound 2022-07-28 16:36:31 +08:00
世界 4bd6eee63e Add shadowsocks-multiuser control api 2022-07-27 21:59:40 +08:00
世界 70f48ddc3f Update documentation 2022-07-27 12:13:31 +08:00
世界 f0a53b5cae Add endpoint independent nat support for tun inbound 2022-07-27 11:59:36 +08:00
世界 3a7a4bab12 Remove go-json 2022-07-26 13:53:25 +08:00
世界 0abf9a06c3 Add optional DoT, DoH3 support 2022-07-26 12:48:10 +08:00
世界 46744ec75b Fix clash tracker timeout 2022-07-26 06:56:24 +08:00
世界 832f906700 Improve udp timeout 2022-07-25 22:15:16 +08:00
世界 c3053249fe Print stack if no context 2022-07-25 16:18:22 +08:00
世界 b23a8dd0a5 Fix format command 2022-07-25 16:18:11 +08:00
世界 6bac91c849 Fix direct udp outbound 2022-07-25 16:18:11 +08:00
世界 18bdfbf187 Improve config struct 2022-07-25 16:18:11 +08:00
世界 94ae7403ef Improve tls dialer and listener 2022-07-25 16:18:11 +08:00
世界 3241e5e968 Add runtime warnings 2022-07-25 07:19:15 +08:00
世界 d52456b74e Add retry for linux process search 2022-07-24 21:43:05 +08:00
世界 223f68b7c3 Add default tcp keep alive settings 2022-07-24 21:29:39 +08:00
世界 7fa1f2dcac Improve udp dns close 2022-07-24 21:25:41 +08:00
世界 698da23a10 Add lint workflow 2022-07-24 21:22:19 +08:00
世界 fd8359df77 Add with_std_json build tag 2022-07-24 21:22:19 +08:00
世界 a56f4bda5c Add route.default_mark option 2022-07-24 17:46:25 +08:00
世界 2bea4818b5 Add source_port_range/port_range rule item 2022-07-24 16:21:35 +08:00
世界 68e8c59225 Add disable_cache option to dns rule 2022-07-24 16:21:31 +08:00
世界 6d8e3235ac Add rcode dns transport 2022-07-24 16:21:31 +08:00
世界 d0f1d7f3dc Add invert rule item 2022-07-24 16:21:31 +08:00
世界 fbdf3e4b38 Fix direct inbound 2022-07-24 13:42:58 +08:00
世界 783ff628db Add process_name/package_name/user/user_id rule item 2022-07-23 21:28:13 +08:00
世界 8009f581fe Fix urltest log 2022-07-23 10:28:32 +08:00
世界 5ab60c4004 Update documentations 2022-07-23 09:29:37 +08:00
世界 d53056360b Deprecate dns_hijack and dns inbound 2022-07-23 09:15:47 +08:00
世界 466912ad4a Improve 4in6 processing 2022-07-22 17:57:23 +08:00
世界 c45e229ce2 Fix tproxy inbound 2022-07-22 16:18:56 +08:00
世界 cfe2a0d4f3 Fix log format 2022-07-22 14:28:29 +08:00
世界 2d78fbb314 Fix dns inbound 2022-07-22 14:25:04 +08:00
世界 17ff830fed Add documentation for selector/urltest outbound 2022-07-22 14:07:27 +08:00
世界 1fef7d93f2 Add urltest outbound 2022-07-22 13:51:08 +08:00
世界 1f3cc0ca7d Expand env in clash external-ui 2022-07-22 09:49:35 +08:00
世界 15ee00c24b Fix integration with clash-dashboard 2022-07-22 09:41:12 +08:00
世界 544fca8257 Add selector outbound 2022-07-21 21:13:16 +08:00
世界 2946ee1267 Improve socksaddr 2022-07-20 22:05:11 +08:00
世界 585e3b325c Minor fixes 2022-07-20 13:46:47 +08:00
世界 c7c66c49ed Add documentation for clash_api 2022-07-20 07:37:50 +08:00
世界 98adef316a Make clash api and gVisor optional 2022-07-20 07:12:40 +08:00
世界 5905ad3278 Add basic clash api 2022-07-19 22:45:55 +08:00
世界 eacf611ee9 Improve connection timeout 2022-07-18 20:53:13 +08:00
世界 f7fa342b31 Add vmess compatibility test 2022-07-18 20:14:53 +08:00
世界 4fce3cff24 Add vmess inbound/outbound 2022-07-18 12:32:31 +08:00
世界 02ef795581 Add user rule item 2022-07-17 17:38:11 +08:00
世界 392a9da692 Exclude gVisor for unsupported arch 2022-07-17 11:16:13 +08:00
世界 9debfd4cc6 Disable gVisor log 2022-07-17 11:15:56 +08:00
世界 175f1f2ba7 Improve workflow build 2022-07-17 09:54:34 +08:00
世界 27423768ac Update dependencies 2022-07-17 09:18:36 +08:00
世界 92df9ff065 Add debug build for all arch 2022-07-17 09:11:23 +08:00
世界 7339521397 Fix build 2022-07-17 08:48:57 +08:00
世界 57a9928fdb Minor fixes 2022-07-16 22:03:35 +08:00
世界 cc711a141a Add stun sniffer 2022-07-16 12:01:02 +08:00
世界 acccd2968c Fix private addr check 2022-07-16 10:19:18 +08:00
世界 9908b4ee6c Fix linux tun 2022-07-15 22:40:42 +08:00
世界 6b4eeda413 Fix set_system_proxy when using sudo 2022-07-15 18:30:01 +08:00
世界 daaa089b31 Fix tun auto_route on android 2022-07-15 18:29:29 +08:00
世界 0c5e07b2d2 Add route.default_interface option 2022-07-15 15:00:54 +08:00
世界 12795bc504 Add ss aead tests 2022-07-15 11:18:19 +08:00
世界 00f1faeea5 Add redir tproxy and dns inbound 2022-07-15 08:42:02 +08:00
世界 7686fd0ecb Improve bind interface 2022-07-14 23:11:53 +08:00
世界 a257c481c3 Add set_system_proxy for linux and android 2022-07-14 20:32:17 +08:00
世界 1d9913604c Add documentation for set_system_proxy 2022-07-14 14:41:35 +08:00
世界 1314345f28 Add set_system_proxy option for windows 2022-07-14 14:41:35 +08:00
世界 901a41d350 Add tun inbound for windows 2022-07-13 22:41:21 +08:00
世界 e3b186733e Refactor log 2022-07-12 17:44:12 +08:00
世界 39c6784ba7 Improve copy early conn 2022-07-11 20:55:14 +08:00
世界 a4ad38a0a9 Fix tcp sniffing 2022-07-11 20:37:57 +08:00
世界 3d16df288c Migrate components to library 2022-07-11 18:44:59 +08:00
世界 f548511d7e Make dns.strategy take effect in dns exchange 2022-07-11 13:21:17 +08:00
世界 90450c4d06 Fix hijack_dns 2022-07-11 12:56:57 +08:00
世界 730599470e Remove ToString0[T] usage to fix golangci-lint 2022-07-10 22:00:28 +08:00
世界 725b15175d Fix create gVisor endpoint 2022-07-10 19:17:44 +08:00
世界 3d5bd9eb1f Add documentation and example for linux tun 2022-07-10 16:44:12 +08:00
世界 70901c0946 Minor fixes 2022-07-10 16:19:42 +08:00
世界 ddfae8cd07 Add hijack_dns for tun 2022-07-10 10:14:45 +08:00
世界 a34057753c Add auto_route and auto_detect_interface for linux 2022-07-10 08:18:52 +08:00
世界 08e03345d5 Fix quic sniff irl 2022-07-10 07:52:33 +08:00
世界 6795fe15dd Add tun inbound for linux 2022-07-09 22:44:18 +08:00
世界 cee09c6e9d Fix pages 2022-07-09 15:09:50 +08:00
世界 e518a26dc2 Add benchmark page 2022-07-09 15:00:31 +08:00
世界 4a7739393f Fix direct udp 2022-07-09 10:28:22 +08:00
世界 b1ad598def Add bug template 2022-07-09 09:34:16 +08:00
世界 a41127179d Declare required fields in the documentation 2022-07-09 09:28:54 +08:00
世界 34a99b5509 Add debug workflow 2022-07-09 09:02:06 +08:00
世界 3a298245a9 Add shadowsocks tests 2022-07-09 08:59:34 +08:00
世界 2cc746aafe Update gci format 2022-07-08 23:03:57 +08:00
世界 1053bcaada Fix handle missing err on quic sniff 2022-07-08 22:49:17 +08:00
世界 1b05b56f04 Add examples 2022-07-08 22:45:06 +08:00
世界 4bab84be67 Add route documentation 2022-07-08 20:20:38 +08:00
世界 b383757742 Add outbound documentation 2022-07-08 19:58:56 +08:00
世界 b39a776785 Add inbound documentation 2022-07-08 18:42:29 +08:00
世界 bd914916b3 Add README 2022-07-08 18:41:18 +08:00
世界 493f517d93 Add log and dns documentation 2022-07-08 18:41:18 +08:00
世界 0cc16a7836 Add dial parallel for outbound dialer 2022-07-08 13:08:29 +08:00
世界 f121a6d723 Improve load geosite 2022-07-08 11:00:46 +08:00
世界 b91ed698cd Add resolver for inbound 2022-07-07 23:45:05 +08:00
世界 f65f3f1ba0 Add resolver for outbound dialer 2022-07-07 21:47:21 +08:00
世界 d921797e3c Add disableCache/disableExpire option for dns client 2022-07-06 23:43:20 +08:00
世界 001dc5f62c Add dns client 2022-07-06 23:14:19 +08:00
世界 63e1b53a49 Add dns transports 2022-07-06 19:01:46 +08:00
世界 a3a61c174f Remove lint action 2022-07-06 15:45:13 +08:00
世界 9107a2fe33 Update gci format 2022-07-06 15:01:09 +08:00
世界 070d3c56ed Add protect path dialer option 2022-07-06 14:45:56 +08:00
世界 8867768a7d Rename find path 2022-07-06 14:44:51 +08:00
世界 3e2dddfb16 Add domain sniffer 2022-07-06 12:39:44 +08:00
世界 625bc649ee Refactor geo resources 2022-07-05 13:23:47 +08:00
世界 f9d8fa2b91 Add geosite 2022-07-05 09:05:35 +08:00
世界 86456b9cbc Add geosite protocol 2022-07-04 19:39:58 +08:00
世界 b8e45853c0 Fix route 2022-07-04 19:34:45 +08:00
世界 dfde4e34c0 Add version command 2022-07-04 17:14:15 +08:00
世界 bcf0bb26a7 Add check/format command 2022-07-04 16:59:27 +08:00
世界 c33a079c88 Refine log output 2022-07-04 16:45:32 +08:00
世界 616b599104 Add domain_regex rule 2022-07-04 15:51:41 +08:00
世界 6af52f8bb6 Shadowsocks multi-user/relay inbound 2022-07-04 15:34:43 +08:00
世界 13c069740f Add http/block outbound & Improve route 2022-07-04 08:16:25 +08:00
世界 f510323dca Refactor struct & Add override dialer options 2022-07-03 20:59:25 +08:00
世界 ffedce0f5f Refactor json 2022-07-03 19:43:27 +08:00
世界 5fc6e2c0db Add internal private geoip rule 2022-07-03 15:57:09 +08:00
世界 388b9f06e9 Add socks outbound 2022-07-03 13:14:49 +08:00
世界 d8cff01c4a Ordered json output & Disallow unknown fields 2022-07-03 11:28:15 +08:00
世界 71d9772913 Add format config support 2022-07-03 03:42:57 +08:00
世界 add5896378 Invalid config check 2022-07-03 01:57:04 +08:00
世界 ad01befeee Implement route rules 2022-07-02 23:19:14 +08:00
世界 0e9bd9b091 Inbound rule support 2022-07-02 14:07:50 +08:00
世界 737a61be66 Refactor adapter 2022-07-01 19:37:41 +08:00
世界 cfa35e5a92 Init commit 2022-07-01 16:58:18 +08:00
2137 changed files with 342017 additions and 20666 deletions
+35
View File
@@ -0,0 +1,35 @@
-s dir
--name sing-box-extended
--category net
--license GPL-3.0-or-later
--description "The universal proxy platform (extended)."
--url "https://sing-box.sagernet.org/"
--maintainer "nekohasekai <contact-git@sekai.icu>"
--no-deb-generate-changes
--provides sing-box
--conflicts sing-box
--replaces sing-box
--config-files /etc/config/sing-box
--config-files /etc/sing-box/config.json
--depends ca-bundle
--depends kmod-inet-diag
--depends kmod-tun
--depends firewall4
--depends kmod-nft-queue
--before-remove release/config/openwrt.prerm
release/config/config.json=/etc/sing-box/config.json
release/config/openwrt.conf=/etc/config/sing-box
release/config/openwrt.init=/etc/init.d/sing-box
release/config/openwrt.keep=/lib/upgrade/keep.d/sing-box
release/completions/sing-box.bash=/usr/share/bash-completion/completions/sing-box.bash
release/completions/sing-box.fish=/usr/share/fish/vendor_completions.d/sing-box.fish
release/completions/sing-box.zsh=/usr/share/zsh/site-functions/_sing-box
LICENSE=/usr/share/licenses/sing-box/LICENSE
+23
View File
@@ -0,0 +1,23 @@
-s dir
--name sing-box
--category net
--license GPL-3.0-or-later
--description "The universal proxy platform."
--url "https://sing-box.sagernet.org/"
--maintainer "nekohasekai <contact-git@sekai.icu>"
--config-files etc/sing-box/config.json
--after-install release/config/sing-box.postinst
release/config/config.json=/etc/sing-box/config.json
release/config/sing-box.service=/usr/lib/systemd/system/sing-box.service
release/config/sing-box@.service=/usr/lib/systemd/system/sing-box@.service
release/config/sing-box.sysusers=/usr/lib/sysusers.d/sing-box.conf
release/config/sing-box.rules=usr/share/polkit-1/rules.d/sing-box.rules
release/config/sing-box-split-dns.xml=/usr/share/dbus-1/system.d/sing-box-split-dns.conf
release/completions/sing-box.bash=/usr/share/bash-completion/completions/sing-box.bash
release/completions/sing-box.fish=/usr/share/fish/vendor_completions.d/sing-box.fish
release/completions/sing-box.zsh=/usr/share/zsh/site-functions/_sing-box
LICENSE=/usr/share/licenses/sing-box/LICENSE
+26
View File
@@ -0,0 +1,26 @@
-s dir
--name sing-box
--category net
--license GPL-3.0-or-later
--description "The universal proxy platform."
--url "https://sing-box.sagernet.org/"
--vendor SagerNet
--maintainer "nekohasekai <contact-git@sekai.icu>"
--deb-field "Bug: https://github.com/SagerNet/sing-box/issues"
--no-deb-generate-changes
--config-files /etc/sing-box/config.json
--after-install release/config/sing-box.postinst
release/config/config.json=/etc/sing-box/config.json
release/config/sing-box.service=/usr/lib/systemd/system/sing-box.service
release/config/sing-box@.service=/usr/lib/systemd/system/sing-box@.service
release/config/sing-box.sysusers=/usr/lib/sysusers.d/sing-box.conf
release/config/sing-box.rules=usr/share/polkit-1/rules.d/sing-box.rules
release/config/sing-box-split-dns.xml=/usr/share/dbus-1/system.d/sing-box-split-dns.conf
release/completions/sing-box.bash=/usr/share/bash-completion/completions/sing-box.bash
release/completions/sing-box.fish=/usr/share/fish/vendor_completions.d/sing-box.fish
release/completions/sing-box.zsh=/usr/share/zsh/site-functions/_sing-box
LICENSE=/usr/share/licenses/sing-box/LICENSE
+1
View File
@@ -0,0 +1 @@
45832ab074849607406baa3e3a2c4660274602ed
+1
View File
@@ -0,0 +1 @@
github: nekohasekai
+76 -57
View File
@@ -1,71 +1,90 @@
name: Bug Report
description: "Create a report to help us improve."
labels: [ bug ]
name: Bug report
description: "Report sing-box bug"
body:
- type: checkboxes
id: terms
- type: dropdown
attributes:
label: Welcome
label: Operating system
description: Operating system type
options:
- label: Yes, I'm using the latest major release. Only such installations are supported.
required: true
- label: Yes, I'm using the latest Golang release. Only such installations are supported.
required: true
- label: Yes, I've searched similar issues on GitHub and didn't find any.
required: true
- label: Yes, I've included all information below (version, config, log, etc).
required: true
- type: textarea
id: problem
attributes:
label: Description of the problem
placeholder: Your problem description
- iOS
- macOS
- Apple tvOS
- Android
- Windows
- Linux
- Others
validations:
required: true
- type: textarea
id: version
- type: input
attributes:
label: Version of sing-box
value: |-
<details>
```console
$ sing-box --version
# Paste output here
```
</details>
label: System version
description: Please provide the operating system version
validations:
required: true
- type: textarea
id: config
- type: dropdown
attributes:
label: Server and client configuration file
value: |-
<details>
```console
# paste json here
```
</details>
label: Installation type
description: Please provide the sing-box installation type
options:
- Original sing-box Command Line
- sing-box for iOS Graphical Client
- sing-box for macOS Graphical Client
- sing-box for Apple tvOS Graphical Client
- sing-box for Android Graphical Client
- sing-box for Windows Graphical Client
- sing-box for Linux Graphical Client
- Third-party graphical clients that advertise themselves as using sing-box (Windows)
- Third-party graphical clients that advertise themselves as using sing-box (Android)
- Others
validations:
required: true
- type: textarea
id: config
- type: input
attributes:
label: Server and client log file
value: |-
<details>
```console
# paste log here
```
</details>
description: Graphical client version
label: If you are using a graphical client, please provide the version of the client.
- type: textarea
attributes:
label: Version
description: If you are using the original command line program, please provide the output of the `sing-box version` command.
render: shell
- type: textarea
attributes:
label: Description
description: Please provide a detailed description of the error.
validations:
required: true
- type: textarea
attributes:
label: Reproduction
description: Please provide the steps to reproduce the error, including the configuration files and procedures that can locally (not dependent on the remote server) reproduce the error using the original command line program of sing-box.
validations:
required: true
- type: textarea
attributes:
label: Logs
description: |-
In addition, if you encounter a crash with the graphical client, please also provide crash logs.
For Apple platform clients, please check `Settings - View Service Log` for crash logs.
For the Android client, please check the `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` file for crash logs.
render: shell
- type: checkboxes
id: supporter
attributes:
label: Supporter
options:
- label: I am a [sponsor](https://github.com/sponsors/nekohasekai/)
- type: checkboxes
attributes:
label: Integrity requirements
description: |-
Please check all of the following options to prove that you have read and understood the requirements, otherwise this issue will be closed.
Sing-box is not a project aimed to please users who can't make any meaningful contributions and gain unethical influence. If you deceive here to deliberately waste the time of the developers, you will be permanently blocked.
options:
- label: I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
required: true
- label: I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
required: true
- label: I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
required: true
- label: I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
required: true
+90
View File
@@ -0,0 +1,90 @@
name: 错误反馈
description: "提交 sing-box 漏洞"
body:
- type: dropdown
attributes:
label: 操作系统
description: 请提供操作系统类型
options:
- iOS
- macOS
- Apple tvOS
- Android
- Windows
- Linux
- 其他
validations:
required: true
- type: input
attributes:
label: 系统版本
description: 请提供操作系统版本
validations:
required: true
- type: dropdown
attributes:
label: 安装类型
description: 请提供该 sing-box 安装类型
options:
- sing-box 原始命令行程序
- sing-box for iOS 图形客户端程序
- sing-box for macOS 图形客户端程序
- sing-box for Apple tvOS 图形客户端程序
- sing-box for Android 图形客户端程序
- sing-box for Windows 图形客户端程序
- sing-box for Linux 图形客户端程序
- 宣传使用 sing-box 的第三方图形客户端程序 (Windows)
- 宣传使用 sing-box 的第三方图形客户端程序 (Android)
- 其他
validations:
required: true
- type: input
attributes:
description: 图形客户端版本
label: 如果您使用图形客户端程序,请提供该程序版本。
- type: textarea
attributes:
label: 版本
description: 如果您使用原始命令行程序,请提供 `sing-box version` 命令的输出。
render: shell
- type: textarea
attributes:
label: 描述
description: 请提供错误的详细描述。
validations:
required: true
- type: textarea
attributes:
label: 重现方式
description: 请提供重现错误的步骤,必须包括可以在本地(不依赖与远程服务器)使用 sing-box 原始命令行程序重现错误的配置文件与流程。
validations:
required: true
- type: textarea
attributes:
label: 日志
description: |-
此外,如果您遭遇图形界面应用程序崩溃,请附加提供崩溃日志。
对于 Apple 平台图形客户端程序,请检查 `Settings - View Service Log` 以导出崩溃日志。
对于 Android 图形客户端程序,请检查 `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` 文件以导出崩溃日志。
render: shell
- type: checkboxes
id: supporter
attributes:
label: 支持我们
options:
- label: 我已经 [赞助](https://github.com/sponsors/nekohasekai/)
- type: checkboxes
attributes:
label: 完整性要求
description: |-
请勾选以下所有选项以证明您已经阅读并理解了以下要求,否则该 issue 将被关闭。
sing-box 不是讨好无法作出任何意义上的贡献的最终用户并获取非道德影响力的项目,如果您在此处欺骗以故意浪费开发者的时间,您将被永久封锁。
options:
- label: 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
required: true
- label: 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
required: true
- label: 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
required: true
- label: 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。
required: true
+94
View File
@@ -0,0 +1,94 @@
#!/usr/bin/env bash
set -e -o pipefail
prepare_apk_root() {
# apk mkpkg resolves owner/group names through --root/etc/{passwd,group}.
APK_ROOT_DIR=$(mktemp -d)
mkdir -p "$APK_ROOT_DIR/etc"
cat > "$APK_ROOT_DIR/etc/passwd" <<EOF
root:x:$(id -u):$(id -g):root:/root:/sbin/nologin
EOF
cat > "$APK_ROOT_DIR/etc/group" <<EOF
root:x:$(id -g):root
EOF
}
ARCHITECTURE="$1"
VERSION="$2"
BINARY_PATH="$3"
OUTPUT_PATH="$4"
if [ -z "$ARCHITECTURE" ] || [ -z "$VERSION" ] || [ -z "$BINARY_PATH" ] || [ -z "$OUTPUT_PATH" ]; then
echo "Usage: $0 <architecture> <version> <binary_path> <output_path>"
exit 1
fi
PROJECT=$(cd "$(dirname "$0")/.."; pwd)
# Convert version to APK format:
# 1.13.0-beta.8 -> 1.13.0_beta8-r0
# 1.13.0-rc.3 -> 1.13.0_rc3-r0
# 1.13.0 -> 1.13.0-r0
APK_VERSION=$(echo "$VERSION" | sed -E 's/-([a-z]+)\.([0-9]+)/_\1\2/')
APK_VERSION="${APK_VERSION}-r0"
ROOT_DIR=$(mktemp -d)
prepare_apk_root
trap 'rm -rf "$ROOT_DIR" "$APK_ROOT_DIR"' EXIT
# Binary
install -Dm755 "$BINARY_PATH" "$ROOT_DIR/usr/bin/sing-box"
# Config files
install -Dm644 "$PROJECT/release/config/config.json" "$ROOT_DIR/etc/sing-box/config.json"
install -Dm755 "$PROJECT/release/config/sing-box.initd" "$ROOT_DIR/etc/init.d/sing-box"
install -Dm644 "$PROJECT/release/config/sing-box.confd" "$ROOT_DIR/etc/conf.d/sing-box"
# Service files
install -Dm644 "$PROJECT/release/config/sing-box.service" "$ROOT_DIR/usr/lib/systemd/system/sing-box.service"
install -Dm644 "$PROJECT/release/config/sing-box@.service" "$ROOT_DIR/usr/lib/systemd/system/sing-box@.service"
# Completions
install -Dm644 "$PROJECT/release/completions/sing-box.bash" "$ROOT_DIR/usr/share/bash-completion/completions/sing-box.bash"
install -Dm644 "$PROJECT/release/completions/sing-box.fish" "$ROOT_DIR/usr/share/fish/vendor_completions.d/sing-box.fish"
install -Dm644 "$PROJECT/release/completions/sing-box.zsh" "$ROOT_DIR/usr/share/zsh/site-functions/_sing-box"
# License
install -Dm644 "$PROJECT/LICENSE" "$ROOT_DIR/usr/share/licenses/sing-box/LICENSE"
# APK metadata
PACKAGES_DIR="$ROOT_DIR/lib/apk/packages"
mkdir -p "$PACKAGES_DIR"
# .conffiles
cat > "$PACKAGES_DIR/.conffiles" <<'EOF'
/etc/conf.d/sing-box
/etc/init.d/sing-box
/etc/sing-box/config.json
EOF
# .conffiles_static (sha256 checksums)
while IFS= read -r conffile; do
sha256=$(sha256sum "$ROOT_DIR$conffile" | cut -d' ' -f1)
echo "$conffile $sha256"
done < "$PACKAGES_DIR/.conffiles" > "$PACKAGES_DIR/.conffiles_static"
# .list (all files, excluding lib/apk/packages/ metadata)
(cd "$ROOT_DIR" && find . -type f -o -type l) \
| sed 's|^\./|/|' \
| grep -v '^/lib/apk/packages/' \
| sort > "$PACKAGES_DIR/.list"
# Build APK
apk --root "$APK_ROOT_DIR" mkpkg \
--info "name:sing-box" \
--info "version:${APK_VERSION}" \
--info "description:The universal proxy platform." \
--info "arch:${ARCHITECTURE}" \
--info "license:GPL-3.0-or-later with name use or association addition" \
--info "origin:sing-box" \
--info "url:https://sing-box.sagernet.org/" \
--info "maintainer:nekohasekai <contact-git@sekai.icu>" \
--files "$ROOT_DIR" \
--output "$OUTPUT_PATH"
+91
View File
@@ -0,0 +1,91 @@
#!/usr/bin/env bash
set -e -o pipefail
prepare_apk_root() {
# apk mkpkg resolves owner/group names through --root/etc/{passwd,group}.
APK_ROOT_DIR=$(mktemp -d)
mkdir -p "$APK_ROOT_DIR/etc"
cat > "$APK_ROOT_DIR/etc/passwd" <<EOF
root:x:$(id -u):$(id -g):root:/root:/sbin/nologin
EOF
cat > "$APK_ROOT_DIR/etc/group" <<EOF
root:x:$(id -g):root
EOF
}
ARCHITECTURE="$1"
VERSION="$2"
BINARY_PATH="$3"
OUTPUT_PATH="$4"
if [ -z "$ARCHITECTURE" ] || [ -z "$VERSION" ] || [ -z "$BINARY_PATH" ] || [ -z "$OUTPUT_PATH" ]; then
echo "Usage: $0 <architecture> <version> <binary_path> <output_path>"
exit 1
fi
PROJECT=$(cd "$(dirname "$0")/.."; pwd)
# Convert version to APK format:
APK_VERSION=$(echo "$VERSION" | sed -E 's/-([a-z]+)\.([0-9]+)/_\1\2/' | sed -E 's/-[a-z]+-/./g')
APK_VERSION="${APK_VERSION}-r0"
ROOT_DIR=$(mktemp -d)
prepare_apk_root
trap 'rm -rf "$ROOT_DIR" "$APK_ROOT_DIR"' EXIT
# Binary
install -Dm755 "$BINARY_PATH" "$ROOT_DIR/usr/bin/sing-box"
# Config files
install -Dm644 "$PROJECT/release/config/config.json" "$ROOT_DIR/etc/sing-box/config.json"
install -Dm644 "$PROJECT/release/config/openwrt.conf" "$ROOT_DIR/etc/config/sing-box"
install -Dm755 "$PROJECT/release/config/openwrt.init" "$ROOT_DIR/etc/init.d/sing-box"
install -Dm644 "$PROJECT/release/config/openwrt.keep" "$ROOT_DIR/lib/upgrade/keep.d/sing-box"
# Completions
install -Dm644 "$PROJECT/release/completions/sing-box.bash" "$ROOT_DIR/usr/share/bash-completion/completions/sing-box.bash"
install -Dm644 "$PROJECT/release/completions/sing-box.fish" "$ROOT_DIR/usr/share/fish/vendor_completions.d/sing-box.fish"
install -Dm644 "$PROJECT/release/completions/sing-box.zsh" "$ROOT_DIR/usr/share/zsh/site-functions/_sing-box"
# License
install -Dm644 "$PROJECT/LICENSE" "$ROOT_DIR/usr/share/licenses/sing-box/LICENSE"
# APK metadata
PACKAGES_DIR="$ROOT_DIR/lib/apk/packages"
mkdir -p "$PACKAGES_DIR"
# .conffiles
cat > "$PACKAGES_DIR/.conffiles" <<'EOF'
/etc/config/sing-box
/etc/sing-box/config.json
EOF
# .conffiles_static (sha256 checksums)
while IFS= read -r conffile; do
sha256=$(sha256sum "$ROOT_DIR$conffile" | cut -d' ' -f1)
echo "$conffile $sha256"
done < "$PACKAGES_DIR/.conffiles" > "$PACKAGES_DIR/.conffiles_static"
# .list (all files, excluding lib/apk/packages/ metadata)
(cd "$ROOT_DIR" && find . -type f -o -type l) \
| sed 's|^\./|/|' \
| grep -v '^/lib/apk/packages/' \
| sort > "$PACKAGES_DIR/.list"
# Build APK
apk --root "$APK_ROOT_DIR" mkpkg \
--info "name:sing-box-extended" \
--info "version:${APK_VERSION}" \
--info "description:The universal proxy platform (extended)." \
--info "arch:${ARCHITECTURE}" \
--info "license:GPL-3.0-or-later" \
--info "origin:sing-box-extended" \
--info "url:https://sing-box.sagernet.org/" \
--info "maintainer:nekohasekai <contact-git@sekai.icu>" \
--info "depends:ca-bundle kmod-inet-diag kmod-tun firewall4 kmod-nft-queue" \
--info "provides:sing-box" \
--info "provider-priority:100" \
--script "pre-deinstall:${PROJECT}/release/config/openwrt.prerm" \
--files "$ROOT_DIR" \
--output "$OUTPUT_PATH"
+57
View File
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
set -e -o pipefail
VERSION="$1"
TARGET="$2"
BINARY_PATH="$3"
PROJECT=$(cd "$(dirname "$0")/.."; pwd)
DIST="$PROJECT/dist"
case "$TARGET" in
linux_amd64*) ARCHITECTURES="x86_64" ;;
linux_arm64*) ARCHITECTURES="aarch64_cortex-a53 aarch64_cortex-a72 aarch64_cortex-a76 aarch64_generic" ;;
linux_386*softfloat) ARCHITECTURES="i386_pentium-mmx" ;;
linux_386*) ARCHITECTURES="i386_pentium4" ;;
linux_arm_7*) ARCHITECTURES="arm_cortex-a5_vfpv4 arm_cortex-a7_neon-vfpv4 arm_cortex-a7_vfpv4 arm_cortex-a8_vfpv3 arm_cortex-a9_neon arm_cortex-a9_vfpv3-d16 arm_cortex-a15_neon-vfpv4" ;;
linux_arm_6*) ARCHITECTURES="arm_arm1176jzf-s_vfp" ;;
linux_arm_5*) ARCHITECTURES="arm_arm926ej-s arm_cortex-a7 arm_cortex-a9 arm_fa526 arm_xscale" ;;
linux_mips64_*) ARCHITECTURES="mips64_mips64r2 mips64_octeonplus" ;;
linux_mips64le*) ARCHITECTURES="mips64el_mips64r2" ;;
linux_mipsle*hardfloat) ARCHITECTURES="mipsel_24kc_24kf" ;;
linux_mipsle*) ARCHITECTURES="mipsel_24kc mipsel_74kc mipsel_mips32" ;;
linux_mips_*) ARCHITECTURES="mips_24kc mips_4kec mips_mips32" ;;
linux_riscv64*) ARCHITECTURES="riscv64_generic" ;;
linux_loong64*) ARCHITECTURES="loongarch64_generic" ;;
*) echo "Unknown target: $TARGET"; exit 1 ;;
esac
PKG_VERSION="${VERSION//-/\~}"
FPM_DIR=$(mktemp -d)
sed "s|release/|$PROJECT/release/|g;s|^LICENSE|$PROJECT/LICENSE|" "$PROJECT/.fpm_openwrt" > "$FPM_DIR/.fpm"
trap 'rm -rf "$FPM_DIR"' EXIT
for ARCH in $ARCHITECTURES; do
TMP_DEB=$(mktemp -p "$DIST" _openwrt_XXXXXX.deb)
rm -f "$TMP_DEB"
(cd "$FPM_DIR" && fpm -t deb \
-v "$PKG_VERSION" \
-p "$TMP_DEB" \
--architecture all \
"$BINARY_PATH=/usr/bin/sing-box")
bash "$PROJECT/.github/deb2ipk.sh" \
"$ARCH" \
"$TMP_DEB" \
"$DIST/sing-box-extended_${VERSION}_openwrt_${ARCH}.ipk"
rm -f "$TMP_DEB"
if command -v apk &>/dev/null; then
bash "$PROJECT/.github/build_openwrt_apk.sh" \
"$ARCH" "$VERSION" "$BINARY_PATH" \
"$DIST/sing-box-extended_${VERSION}_openwrt_${ARCH}.apk"
fi
echo "Built: sing-box-extended_${VERSION}_openwrt_${ARCH} (.ipk/.apk)"
done
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# mod from https://gist.github.com/pldubouilh/c5703052986bfdd404005951dee54683
set -e -o pipefail
PROJECT=$(dirname "$0")/../..
TMP_PATH=`mktemp -d`
cp $2 $TMP_PATH
pushd $TMP_PATH
DEB_NAME=`ls *.deb`
ar x $DEB_NAME
mkdir control
pushd control
tar xf ../control.tar.gz
rm md5sums
sed "s/Architecture:\\ \w*/Architecture:\\ $1/g" ./control -i
cat control
tar czf ../control.tar.gz ./*
popd
DEB_NAME=${DEB_NAME%.deb}
tar czf $DEB_NAME.ipk control.tar.gz data.tar.gz debian-binary
popd
cp $TMP_PATH/$DEB_NAME.ipk $3
rm -r $TMP_PATH
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
branches=$(git branch -r --contains HEAD)
if echo "$branches" | grep -q 'origin/stable'; then
track=stable
elif echo "$branches" | grep -q 'origin/testing'; then
track=testing
elif echo "$branches" | grep -q 'origin/oldstable'; then
track=oldstable
else
echo "ERROR: HEAD is not on any known release branch (stable/testing/oldstable)" >&2
exit 1
fi
if [[ "$track" == "stable" ]]; then
tag=$(git describe --tags --exact-match HEAD 2>/dev/null || true)
if [[ -n "$tag" && "$tag" == *"-"* ]]; then
track=beta
fi
fi
case "$track" in
stable) name=sing-box; docker_tag=latest ;;
beta) name=sing-box-beta; docker_tag=latest-beta ;;
testing) name=sing-box-testing; docker_tag=latest-testing ;;
oldstable) name=sing-box-oldstable; docker_tag=latest-oldstable ;;
esac
echo "track=${track} name=${name} docker_tag=${docker_tag}" >&2
echo "TRACK=${track}" >> "$GITHUB_ENV"
echo "NAME=${name}" >> "$GITHUB_ENV"
echo "DOCKER_TAG=${docker_tag}" >> "$GITHUB_ENV"
+28
View File
@@ -0,0 +1,28 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"commitMessagePrefix": "[dependencies]",
"extends": [
"config:base",
":disableRateLimiting"
],
"baseBranches": [
"unstable"
],
"golang": {
"enabled": false
},
"packageRules": [
{
"matchManagers": [
"github-actions"
],
"groupName": "github-actions"
},
{
"matchManagers": [
"dockerfile"
],
"groupName": "Dockerfile"
}
]
}
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -euo pipefail
VERSION="1.26.7"
PATCH_COMMITS=(
"f080b0c6346eb690c0dc82497b35925f385b35ac"
"2d9c12887c342fb9051d231aa5388743cb7e9cb6"
"367663849c656612fc3c8875ef6e7f6b0c93dbd0"
)
CURL_ARGS=(
-fL
--silent
--show-error
)
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
CURL_ARGS+=(-H "Authorization: Bearer ${GITHUB_TOKEN}")
fi
mkdir -p "$HOME/go"
cd "$HOME/go"
wget "https://dl.google.com/go/go${VERSION}.darwin-arm64.tar.gz"
tar -xzf "go${VERSION}.darwin-arm64.tar.gz"
#cp -a go go_bootstrap
mv go go_osx
cd go_osx
# these patch URLs only work on golang1.26.x
# that means after golang1.27 release it must be changed
# see: https://github.com/SagerNet/go/commits/release-branch.go1.26/
# revert:
# 33d3f603c1: "cmd/link/internal/ld: use 12.0.0 OS/SDK versions for macOS linking"
# 937368f84e: "crypto/x509: change how we retrieve chains on darwin"
# d90a57ffe8: "cmd/link/internal/ld: unify OS/SDK versions for macOS linking"
for patch_commit in "${PATCH_COMMITS[@]}"; do
curl "${CURL_ARGS[@]}" "https://github.com/SagerNet/go/commit/${patch_commit}.diff" | patch --verbose -p 1
done
# Rebuild is not needed: we build with CGO_ENABLED=1, so Apple's external
# linker handles LC_BUILD_VERSION via MACOSX_DEPLOYMENT_TARGET, and the
# stdlib (crypto/x509) is compiled from patched src automatically.
#cd src
#GOROOT_BOOTSTRAP="$HOME/go/go_bootstrap" ./make.bash
#cd ../..
#rm -rf go_bootstrap "go${VERSION}.darwin-arm64.tar.gz"
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
set -euo pipefail
VERSION="1.26.7"
PATCH_COMMITS=(
"a4ae550aa148b04c9d4890e98bee63aede5c4b53"
"95b851f661584711faa8115b3234a461044f4510"
"b0bf0a863cf218b9bb0d6c013903ab160ae0c39b"
"7c7a2a0d68920f8764d9a3aeae7ad1067a17b3fa"
"ba34356e82f3c12a7303d2231e6ea0e42bbbb3bf"
"472a88edbc2a42feb53fa31d29ab54d33840dca6"
)
CURL_ARGS=(
-fL
--silent
--show-error
)
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
CURL_ARGS+=(-H "Authorization: Bearer ${GITHUB_TOKEN}")
fi
mkdir -p "$HOME/go"
cd "$HOME/go"
wget "https://dl.google.com/go/go${VERSION}.linux-amd64.tar.gz"
tar -xzf "go${VERSION}.linux-amd64.tar.gz"
mv go go_win7
cd go_win7
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
# these patch URLs only work on golang1.26.x
# that means after golang1.27 release it must be changed
# see: https://github.com/MetaCubeX/go/commits/release-branch.go1.26/
# revert:
# 693def151adff1af707d82d28f55dba81ceb08e1: "crypto/rand,runtime: switch RtlGenRandom for ProcessPrng"
# 7c1157f9544922e96945196b47b95664b1e39108: "net: remove sysSocket fallback for Windows 7"
# 48042aa09c2f878c4faa576948b07fe625c4707a: "syscall: remove Windows 7 console handle workaround"
# a17d959debdb04cd550016a3501dd09d50cd62e7: "runtime: always use LoadLibraryEx to load system libraries"
# fixes:
# bed309eff415bcb3c77dd4bc3277b682b89a388d: "Fix os.RemoveAll not working on Windows7"
# 34b899c2fb39b092db4fa67c4417e41dc046be4b: "Revert \"os: remove 5ms sleep on Windows in (*Process).Wait\""
for patch_commit in "${PATCH_COMMITS[@]}"; do
curl "${CURL_ARGS[@]}" "https://github.com/MetaCubeX/go/commit/${patch_commit}.diff" | patch --verbose -p 1
done
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
PROJECTS=$(dirname "$0")/../..
function updateClient() {
pushd clients/$1
git fetch origin main
git reset FETCH_HEAD --hard
popd
git add clients/$1
}
updateClient "apple"
updateClient "android"
updateClient "desktop"
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e -o pipefail
SCRIPT_DIR=$(dirname "$0")
PROJECTS=$SCRIPT_DIR/../..
git -C $PROJECTS/cronet-go fetch origin main
git -C $PROJECTS/cronet-go fetch origin go
go get -x github.com/sagernet/cronet-go/all@$(git -C $PROJECTS/cronet-go rev-parse origin/go)
go get -x github.com/sagernet/cronet-go@$(git -C $PROJECTS/cronet-go rev-parse origin/go)
go mod tidy
git -C $PROJECTS/cronet-go rev-parse origin/go > "$SCRIPT_DIR/CRONET_GO_VERSION"
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e -o pipefail
SCRIPT_DIR=$(dirname "$0")
PROJECTS=$SCRIPT_DIR/../..
git -C $PROJECTS/cronet-go fetch origin dev
git -C $PROJECTS/cronet-go fetch origin go_dev
go get -x github.com/sagernet/cronet-go/all@$(git -C $PROJECTS/cronet-go rev-parse origin/go_dev)
go get -x github.com/sagernet/cronet-go@$(git -C $PROJECTS/cronet-go rev-parse origin/go_dev)
go mod tidy
git -C $PROJECTS/cronet-go rev-parse origin/go_dev > "$SCRIPT_DIR/CRONET_GO_VERSION"
+1 -6
View File
@@ -1,10 +1,5 @@
#!/usr/bin/env bash
PROJECTS=$(dirname "$0")/../..
go get -x github.com/sagernet/sing@$(git -C $PROJECTS/sing rev-parse HEAD)
go get -x github.com/sagernet/sing-dns@$(git -C $PROJECTS/sing-dns rev-parse HEAD)
go get -x github.com/sagernet/sing-tun@$(git -C $PROJECTS/sing-tun rev-parse HEAD)
go get -x github.com/sagernet/sing-shadowsocks@$(git -C $PROJECTS/sing-shadowsocks rev-parse HEAD)
go get -x github.com/sagernet/sing-vmess@$(git -C $PROJECTS/sing-vmess rev-parse HEAD)
go get -x github.com/sagernet/$1@$(git -C $PROJECTS/$1 rev-parse HEAD)
go mod tidy
File diff suppressed because it is too large Load Diff
-191
View File
@@ -1,191 +0,0 @@
name: Debug build
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/debug.yml'
pull_request:
branches:
- dev
jobs:
build:
name: Debug build
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get latest go version
id: version
run: |
echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.version.outputs.go_version }}
- name: Cache go module
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Add cache to Go proxy
run: |
version=`git rev-parse HEAD`
mkdir build
pushd build
go mod init build
go get -v github.com/sagernet/sing-box@$version
popd
continue-on-error: true
- name: Run Test
run: |
go test -v ./...
cross:
strategy:
matrix:
include:
# windows
- name: windows-amd64
goos: windows
goarch: amd64
goamd64: v1
- name: windows-amd64-v3
goos: windows
goarch: amd64
goamd64: v3
- name: windows-386
goos: windows
goarch: 386
- name: windows-arm64
goos: windows
goarch: arm64
- name: windows-arm32v7
goos: windows
goarch: arm
goarm: 7
# linux
- name: linux-amd64
goos: linux
goarch: amd64
goamd64: v1
- name: linux-amd64-v3
goos: linux
goarch: amd64
goamd64: v3
- name: linux-386
goos: linux
goarch: 386
- name: linux-arm64
goos: linux
goarch: arm64
- name: linux-armv5
goos: linux
goarch: arm
goarm: 5
- name: linux-armv6
goos: linux
goarch: arm
goarm: 6
- name: linux-armv7
goos: linux
goarch: arm
goarm: 7
- name: linux-mips-softfloat
goos: linux
goarch: mips
gomips: softfloat
- name: linux-mips-hardfloat
goos: linux
goarch: mips
gomips: hardfloat
- name: linux-mipsel-softfloat
goos: linux
goarch: mipsle
gomips: softfloat
- name: linux-mipsel-hardfloat
goos: linux
goarch: mipsle
gomips: hardfloat
- name: linux-mips64
goos: linux
goarch: mips64
- name: linux-mips64el
goos: linux
goarch: mips64le
# darwin
- name: darwin-amd64
goos: darwin
goarch: amd64
goamd64: v1
- name: darwin-amd64-v3
goos: darwin
goarch: amd64
goamd64: v3
- name: darwin-arm64
goos: darwin
goarch: arm64
# freebsd
- name: freebsd-amd64
goos: freebsd
goarch: amd64
goamd64: v1
- name: freebsd-amd64-v3
goos: freebsd
goarch: amd64
goamd64: v3
- name: freebsd-386
goos: freebsd
goarch: 386
- name: freebsd-arm64
goos: freebsd
goarch: arm64
fail-fast: false
runs-on: ubuntu-latest
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOAMD64: ${{ matrix.goamd64 }}
GOARM: ${{ matrix.goarm }}
GOMIPS: ${{ matrix.gomips }}
CGO_ENABLED: 0
TAGS: with_clash_api,with_quic
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get latest go version
id: version
run: |
echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.version.outputs.go_version }}
- name: Cache go module
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Build
id: build
run: make
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: sing-box-${{ matrix.name }}
path: sing-box*
+296
View File
@@ -0,0 +1,296 @@
name: Publish Docker Images
on:
#push:
# branches:
# - stable
# - testing
release:
types:
- published
workflow_dispatch:
inputs:
tag:
description: "The tag version you want to build"
env:
REGISTRY_IMAGE: ghcr.io/sagernet/sing-box
jobs:
build_binary:
name: Build binary
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
# Naive-enabled builds (musl)
- { arch: amd64, naive: true, docker_platform: "linux/amd64" }
- { arch: arm64, naive: true, docker_platform: "linux/arm64" }
- { arch: "386", naive: true, docker_platform: "linux/386" }
- { arch: arm, goarm: "7", naive: true, docker_platform: "linux/arm/v7" }
- { arch: mipsle, gomips: softfloat, naive: true, docker_platform: "linux/mipsle" }
- { arch: riscv64, naive: true, docker_platform: "linux/riscv64" }
- { arch: loong64, naive: true, docker_platform: "linux/loong64" }
# Non-naive builds
- { arch: arm, goarm: "6", docker_platform: "linux/arm/v6" }
- { arch: ppc64le, docker_platform: "linux/ppc64le" }
- { arch: s390x, docker_platform: "linux/s390x" }
steps:
- name: Get commit to build
id: ref
run: |-
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
ref="${{ github.ref_name }}"
else
ref="${{ github.event.inputs.tag }}"
fi
echo "ref=$ref"
echo "ref=$ref" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ steps.ref.outputs.ref }}
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.26.7
- name: Clone cronet-go
if: matrix.naive
run: |
set -xeuo pipefail
CRONET_GO_VERSION=$(cat .github/CRONET_GO_VERSION)
git init ~/cronet-go
git -C ~/cronet-go remote add origin https://github.com/sagernet/cronet-go.git
git -C ~/cronet-go sparse-checkout set --no-cone '/*' '!/lib'
git -C ~/cronet-go fetch --depth=1 --filter=blob:none origin "$CRONET_GO_VERSION"
git -C ~/cronet-go checkout FETCH_HEAD
git -C ~/cronet-go submodule update --init --recursive --depth=1
- name: Regenerate Debian keyring
if: matrix.naive
run: |
set -xeuo pipefail
rm -f ~/cronet-go/naiveproxy/src/build/linux/sysroot_scripts/keyring.gpg
cd ~/cronet-go
GPG_TTY=/dev/null ./naiveproxy/src/build/linux/sysroot_scripts/generate_keyring.sh
- name: Cache Chromium toolchain
if: matrix.naive
id: cache-chromium-toolchain
uses: actions/cache@v4
with:
path: |
~/cronet-go/naiveproxy/src/third_party/llvm-build/
~/cronet-go/naiveproxy/src/gn/out/
~/cronet-go/naiveproxy/src/chrome/build/pgo_profiles/
~/cronet-go/naiveproxy/src/out/sysroot-build/
key: chromium-toolchain-${{ matrix.arch }}-musl-${{ hashFiles('.github/CRONET_GO_VERSION') }}
- name: Download Chromium toolchain
if: matrix.naive
run: |
set -xeuo pipefail
cd ~/cronet-go
go run ./cmd/build-naive --target=linux/${{ matrix.arch }} --libc=musl download-toolchain
- name: Set version
run: |
set -xeuo pipefail
VERSION=$(go run ./cmd/internal/read_tag)
echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
- name: Set Chromium toolchain environment
if: matrix.naive
run: |
set -xeuo pipefail
cd ~/cronet-go
go run ./cmd/build-naive --target=linux/${{ matrix.arch }} --libc=musl env >> $GITHUB_ENV
- name: Set build tags
run: |
set -xeuo pipefail
if [[ "${{ matrix.naive }}" == "true" ]]; then
TAGS="$(cat release/DEFAULT_BUILD_TAGS),with_musl"
else
TAGS=$(cat release/DEFAULT_BUILD_TAGS_OTHERS)
fi
echo "BUILD_TAGS=${TAGS}" >> "${GITHUB_ENV}"
- name: Set shared ldflags
run: |
echo "LDFLAGS_SHARED=$(cat release/LDFLAGS)" >> "${GITHUB_ENV}"
- name: Build (naive)
if: matrix.naive
run: |
set -xeuo pipefail
go build -v -trimpath -o sing-box -tags "${BUILD_TAGS}" \
-ldflags "-X 'github.com/sagernet/sing-box/constant.Version=${VERSION}' ${LDFLAGS_SHARED} -s -w -buildid=" \
./cmd/sing-box
env:
CGO_ENABLED: "1"
GOOS: linux
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.goarm }}
GOMIPS: ${{ matrix.gomips }}
- name: Build (non-naive)
if: ${{ ! matrix.naive }}
run: |
set -xeuo pipefail
go build -v -trimpath -o sing-box -tags "${BUILD_TAGS}" \
-ldflags "-X 'github.com/sagernet/sing-box/constant.Version=${VERSION}' ${LDFLAGS_SHARED} -s -w -buildid=" \
./cmd/sing-box
env:
CGO_ENABLED: "0"
GOOS: linux
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.goarm }}
- name: Prepare artifact
run: |
platform=${{ matrix.docker_platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
# Rename binary to include arch info for Dockerfile.binary
BINARY_NAME="sing-box-${{ matrix.arch }}"
if [[ -n "${{ matrix.goarm }}" ]]; then
BINARY_NAME="${BINARY_NAME}v${{ matrix.goarm }}"
fi
mv sing-box "${BINARY_NAME}"
echo "BINARY_NAME=${BINARY_NAME}" >> $GITHUB_ENV
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: binary-${{ env.PLATFORM_PAIR }}
path: ${{ env.BINARY_NAME }}
if-no-files-found: error
retention-days: 1
build_docker:
name: Build Docker image
runs-on: ubuntu-latest
needs:
- build_binary
strategy:
fail-fast: true
matrix:
include:
- { platform: "linux/amd64" }
- { platform: "linux/arm/v6" }
- { platform: "linux/arm/v7" }
- { platform: "linux/arm64" }
- { platform: "linux/386" }
# mipsle: no base Docker image available for this platform
- { platform: "linux/ppc64le" }
- { platform: "linux/riscv64" }
- { platform: "linux/s390x" }
- { platform: "linux/loong64", base_image: "ghcr.io/loong64/alpine:edge" }
steps:
- name: Get commit to build
id: ref
run: |-
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
ref="${{ github.ref_name }}"
else
ref="${{ github.event.inputs.tag }}"
fi
echo "ref=$ref"
echo "ref=$ref" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ steps.ref.outputs.ref }}
fetch-depth: 0
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Download binary
uses: actions/download-artifact@v5
with:
name: binary-${{ env.PLATFORM_PAIR }}
path: .
- name: Prepare binary
run: |
# Find and make the binary executable
chmod +x sing-box-*
ls -la sing-box-*
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
context: .
file: Dockerfile.binary
build-args: |
BASE_IMAGE=${{ matrix.base_image || 'alpine' }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
if: github.event_name != 'push'
runs-on: ubuntu-latest
needs:
- build_docker
steps:
- name: Get commit to build
id: ref
run: |-
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
ref="${{ github.ref_name }}"
else
ref="${{ github.event.inputs.tag }}"
fi
echo "ref=$ref"
echo "ref=$ref" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ steps.ref.outputs.ref }}
fetch-depth: 0
- name: Detect track
run: bash .github/detect_track.sh
- name: Download digests
uses: actions/download-artifact@v5
with:
path: /tmp/digests
pattern: digests-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest list and push
if: github.event_name != 'push'
working-directory: /tmp/digests
run: |
docker buildx imagetools create \
-t "${{ env.REGISTRY_IMAGE }}:${{ env.DOCKER_TAG }}" \
-t "${{ env.REGISTRY_IMAGE }}:${{ steps.ref.outputs.ref }}" \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
if: github.event_name != 'push'
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ env.DOCKER_TAG }}
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.ref.outputs.ref }}
+52 -21
View File
@@ -3,46 +3,77 @@ name: Lint
on:
push:
branches:
- dev
- oldstable
- stable
- testing
- unstable
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/debug.yml'
- '!.github/workflows/lint.yml'
pull_request:
branches:
- dev
- oldstable
- stable
- testing
- unstable
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}-${{ inputs.build }}
cancel-in-progress: true
jobs:
build:
name: Build
name: Lint ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: windows
goarch: amd64
- goos: windows
goarch: '386'
- goos: windows
goarch: arm64
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: linux
goarch: arm
- goos: linux
goarch: '386'
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: android
goarch: arm64
# - goos: freebsd
# goarch: amd64
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest go version
id: version
run: |
echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ steps.version.outputs.go_version }}
go-version: ^1.26
- name: Cache go module
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
- name: Get dependencies
run: |
go mod download -x
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v8
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
with:
version: latest
version: latest
args: --timeout=30m
install-mode: binary
verify: false
+243
View File
@@ -0,0 +1,243 @@
name: Build Linux Packages
on:
#push:
# branches:
# - stable
# - testing
workflow_dispatch:
inputs:
version:
description: "Version name"
required: true
type: string
release:
types:
- published
jobs:
calculate_version:
name: Calculate version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.outputs.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.26.7
- name: Check input version
if: github.event_name == 'workflow_dispatch'
run: |-
echo "version=${{ inputs.version }}"
echo "version=${{ inputs.version }}" >> "$GITHUB_ENV"
- name: Calculate version
if: github.event_name != 'workflow_dispatch'
run: |-
go run -v ./cmd/internal/read_tag --ci --nightly
- name: Set outputs
id: outputs
run: |-
echo "version=$version" >> "$GITHUB_OUTPUT"
build:
name: Build binary
runs-on: ubuntu-26.04
needs:
- calculate_version
strategy:
matrix:
include:
# Naive-enabled builds (musl)
- { os: linux, arch: amd64, naive: true, debian: amd64, rpm: x86_64, pacman: x86_64 }
- { os: linux, arch: arm64, naive: true, debian: arm64, rpm: aarch64, pacman: aarch64 }
- { os: linux, arch: "386", naive: true, debian: i386, rpm: i386 }
- { os: linux, arch: arm, goarm: "7", naive: true, debian: armhf, rpm: armv7hl, pacman: armv7hl }
- { os: linux, arch: mipsle, gomips: softfloat, naive: true, debian: mipsel, rpm: mipsel }
- { os: linux, arch: riscv64, naive: true, debian: riscv64, rpm: riscv64 }
- { os: linux, arch: loong64, naive: true, debian: loongarch64, rpm: loongarch64 }
# Non-naive builds (unsupported architectures)
- { os: linux, arch: arm, goarm: "6", debian: armel, rpm: armv6hl }
- { os: linux, arch: mips64le, debian: mips64el, rpm: mips64el }
- { os: linux, arch: s390x, debian: s390x, rpm: s390x }
- { os: linux, arch: ppc64le, debian: ppc64el, rpm: ppc64le }
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.26.7
- name: Clone cronet-go
if: matrix.naive
run: |
set -xeuo pipefail
CRONET_GO_VERSION=$(cat .github/CRONET_GO_VERSION)
git init ~/cronet-go
git -C ~/cronet-go remote add origin https://github.com/sagernet/cronet-go.git
git -C ~/cronet-go sparse-checkout set --no-cone '/*' '!/lib'
git -C ~/cronet-go fetch --depth=1 --filter=blob:none origin "$CRONET_GO_VERSION"
git -C ~/cronet-go checkout FETCH_HEAD
git -C ~/cronet-go submodule update --init --recursive --depth=1
- name: Regenerate Debian keyring
if: matrix.naive
run: |
set -xeuo pipefail
rm -f ~/cronet-go/naiveproxy/src/build/linux/sysroot_scripts/keyring.gpg
cd ~/cronet-go
GPG_TTY=/dev/null ./naiveproxy/src/build/linux/sysroot_scripts/generate_keyring.sh
- name: Cache Chromium toolchain
if: matrix.naive
id: cache-chromium-toolchain
uses: actions/cache@v4
with:
path: |
~/cronet-go/naiveproxy/src/third_party/llvm-build/
~/cronet-go/naiveproxy/src/gn/out/
~/cronet-go/naiveproxy/src/chrome/build/pgo_profiles/
~/cronet-go/naiveproxy/src/out/sysroot-build/
key: chromium-toolchain-${{ matrix.arch }}-musl-${{ hashFiles('.github/CRONET_GO_VERSION') }}
- name: Download Chromium toolchain
if: matrix.naive
run: |
set -xeuo pipefail
cd ~/cronet-go
go run ./cmd/build-naive --target=linux/${{ matrix.arch }} --libc=musl download-toolchain
- name: Set Chromium toolchain environment
if: matrix.naive
run: |
set -xeuo pipefail
cd ~/cronet-go
go run ./cmd/build-naive --target=linux/${{ matrix.arch }} --libc=musl env >> $GITHUB_ENV
- name: Set tag
run: |-
git ls-remote --exit-code --tags origin v${{ needs.calculate_version.outputs.version }} || echo "PUBLISHED=false" >> "$GITHUB_ENV"
git tag v${{ needs.calculate_version.outputs.version }} -f
- name: Set build tags
run: |
set -xeuo pipefail
if [[ "${{ matrix.naive }}" == "true" ]]; then
TAGS="$(cat release/DEFAULT_BUILD_TAGS),with_musl"
else
TAGS=$(cat release/DEFAULT_BUILD_TAGS_OTHERS)
fi
echo "BUILD_TAGS=${TAGS}" >> "${GITHUB_ENV}"
- name: Set shared ldflags
run: |
echo "LDFLAGS_SHARED=$(cat release/LDFLAGS)" >> "${GITHUB_ENV}"
- name: Build (naive)
if: matrix.naive
run: |
set -xeuo pipefail
mkdir -p dist
go build -v -trimpath -o dist/sing-box -tags "${BUILD_TAGS}" \
-ldflags "-X 'github.com/sagernet/sing-box/constant.Version=${{ needs.calculate_version.outputs.version }}' ${LDFLAGS_SHARED} -s -w -buildid=" \
./cmd/sing-box
env:
CGO_ENABLED: "1"
GOOS: linux
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.goarm }}
GOMIPS: ${{ matrix.gomips }}
GOMIPS64: ${{ matrix.gomips }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build (non-naive)
if: ${{ ! matrix.naive }}
run: |
set -xeuo pipefail
mkdir -p dist
go build -v -trimpath -o dist/sing-box -tags "${BUILD_TAGS}" \
-ldflags "-X 'github.com/sagernet/sing-box/constant.Version=${{ needs.calculate_version.outputs.version }}' ${LDFLAGS_SHARED} -s -w -buildid=" \
./cmd/sing-box
env:
CGO_ENABLED: "0"
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.goarm }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set mtime
run: |-
TZ=UTC touch -t '197001010000' dist/sing-box
- name: Detect track
run: bash .github/detect_track.sh
- name: Set version
run: |-
PKG_VERSION="${{ needs.calculate_version.outputs.version }}"
PKG_VERSION="${PKG_VERSION//-/\~}"
echo "PKG_VERSION=${PKG_VERSION}" >> "${GITHUB_ENV}"
- name: Package DEB
if: matrix.debian != ''
run: |
set -xeuo pipefail
sudo gem install fpm
sudo apt-get install -y debsigs
cp .fpm_systemd .fpm
fpm -t deb \
--name "${NAME}" \
-v "$PKG_VERSION" \
-p "dist/${NAME}_${{ needs.calculate_version.outputs.version }}_linux_${{ matrix.debian }}.deb" \
--architecture ${{ matrix.debian }} \
dist/sing-box=/usr/bin/sing-box
rm -rf $HOME/.gnupg
gpg --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" --import <<EOF
${{ secrets.GPG_KEY }}
EOF
debsigs --sign=origin -k ${{ secrets.GPG_KEY_ID }} --gpgopts '--pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}"' dist/*.deb
- name: Package RPM
if: matrix.rpm != ''
run: |-
set -xeuo pipefail
sudo gem install fpm
echo '%_rpmformat 4' > "$HOME/.rpmmacros"
cp .fpm_systemd .fpm
fpm -t rpm \
--name "${NAME}" \
-v "$PKG_VERSION" \
-p "dist/${NAME}_${{ needs.calculate_version.outputs.version }}_linux_${{ matrix.rpm }}.rpm" \
--architecture ${{ matrix.rpm }} \
dist/sing-box=/usr/bin/sing-box
cat > $HOME/.rpmmacros <<EOF
%_gpg_name ${{ secrets.GPG_KEY_ID }}
%_gpg_sign_cmd_extra_args --pinentry-mode loopback --passphrase ${{ secrets.GPG_PASSPHRASE }}
EOF
gpg --pinentry-mode loopback --passphrase "${{ secrets.GPG_PASSPHRASE }}" --import <<EOF
${{ secrets.GPG_KEY }}
EOF
rpmsign --addsign dist/*.rpm
- name: Cleanup
run: rm dist/sing-box
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}_${{ matrix.arch }}${{ matrix.goarm && format('v{0}', matrix.goarm) }}${{ matrix.legacy_go && '-legacy' || '' }}
path: "dist"
upload:
name: Upload builds
runs-on: ubuntu-latest
needs:
- calculate_version
- build
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
- name: Set tag
run: |-
git ls-remote --exit-code --tags origin v${{ needs.calculate_version.outputs.version }} || echo "PUBLISHED=false" >> "$GITHUB_ENV"
git tag v${{ needs.calculate_version.outputs.version }} -f
echo "VERSION=${{ needs.calculate_version.outputs.version }}" >> "$GITHUB_ENV"
- name: Download builds
uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true
- name: Publish packages
if: github.event_name != 'push'
run: |-
ls dist | xargs -I {} curl -F "package=@dist/{}" https://${{ secrets.FURY_TOKEN }}@push.fury.io/sagernet/
-18
View File
@@ -1,18 +0,0 @@
name: Generate Documents
on:
push:
branches:
- dev
paths:
- docs/**
- .github/workflows/mkdocs.yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-static-i18n
- run: mkdocs gh-deploy -m "{sha}" --force --ignore-version --no-history
+3 -2
View File
@@ -8,8 +8,9 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days'
days-before-stale: 60
days-before-close: 5
days-before-close: 5
exempt-issue-labels: 'bug,enhancement'
+57
View File
@@ -0,0 +1,57 @@
name: Test
on:
push:
branches:
- oldstable
- stable
- testing
- unstable
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/test.yml'
pull_request:
branches:
- oldstable
- stable
- testing
- unstable
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}-${{ inputs.build }}
cancel-in-progress: true
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
go:
- ~1.25
- ~1.26
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Set build tags and ldflags
shell: bash
run: |
echo "BUILD_TAGS=$(cat release/DEFAULT_BUILD_TAGS_OTHERS)" >> "$GITHUB_ENV"
echo "LDFLAGS_SHARED=$(cat release/LDFLAGS)" >> "$GITHUB_ENV"
- name: Test (unix)
if: matrix.os != 'windows-latest'
run: go test -v -exec sudo -tags "$BUILD_TAGS" -ldflags "$LDFLAGS_SHARED" ./...
- name: Test (windows)
if: matrix.os == 'windows-latest'
shell: bash
run: go test -v -tags "$BUILD_TAGS" -ldflags "$LDFLAGS_SHARED" ./...
+26 -1
View File
@@ -1,7 +1,32 @@
/.idea/
/vendor/
/*.json
/*.srs
/*.db
/site/
/bin/
/dist/
/dist/
/sing-box
/sing-box.exe
/build/
/*.jar
/*.aar
/*.xcframework/
/experimental/libbox/*.aar
/experimental/libbox/*.xcframework/
/experimental/libbox/*.nupkg
.DS_Store
/config.d/
/venv/
CLAUDE.md
AGENTS.md
/.claude/
dist
logs
/*.so
/*.log
/*.db-shm
/*.db-wal
/*.db.backup.*
/test_download.bin
/wget-log
View File
+53 -14
View File
@@ -1,17 +1,56 @@
version: "2"
run:
go: "1.24"
build-tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_ccm
- with_ocm
- badlinkname
- tfogo_checklinkname0
linters:
disable-all: true
default: none
enable:
- gofumpt
- govet
# - gci
- ineffassign
- staticcheck
- paralleltest
linters-settings:
# gci:
# sections:
# - standard
# - prefix(github.com/sagernet/)
# - default
staticcheck:
go: '1.19'
- unused
- modernize
settings:
modernize:
disable:
- omitzero # nested struct omitempty -> omitzero changes JSON output semantics
staticcheck:
checks:
- all
- -QF1008 # could remove embedded field "<interface>" from selector
- -ST1003 # should not use ALL_CAPS in Go names; use CamelCase instead
- -QF1001 # could apply De Morgan's law
- -SA4023 # impossible nil comparison, false positive on platform-specific implementations
exclusions:
generated: lax
presets:
- comments
- common-false-positives
paths:
- transport/simple-obfs
- \.pb\.go$
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- prefix(github.com/sagernet/)
- default
custom-order: true
+512 -42
View File
@@ -1,70 +1,529 @@
version: 2
project_name: sing-box
builds:
- main: ./cmd/sing-box
- &template
id: main
main: ./cmd/sing-box
flags:
- -v
- -trimpath
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
- -X github.com/sagernet/sing-box/constant.Commit={{ .ShortCommit }} -s -w -buildid=
- -X github.com/sagernet/sing-box/constant.Version={{ .Version }}
- -s
- -buildid=
- -checklinkname=0
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
env:
- CGO_ENABLED=0
- GOTOOLCHAIN=local
targets:
- linux_386
- linux_amd64_v1
- linux_amd64_v3
- linux_arm64
- linux_arm_6
- linux_arm_7
- linux_s390x
- linux_riscv64
- windows_amd64_v1
- windows_amd64_v3
- windows_386
- windows_arm64
- darwin_amd64_v1
- darwin_amd64_v3
- darwin_arm64
mod_timestamp: '{{ .CommitTimestamp }}'
snapshot:
name_template: "{{ .Version }}.{{ .ShortCommit }}"
- id: mips
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_profiler
- badlinkname
- tfogo_checklinkname0
targets:
- linux_mips
- linux_mips_softfloat
- linux_mipsle
- linux_mipsle_softfloat
- linux_mips64
- linux_mips64le
- id: android
<<: *template
env:
- CGO_ENABLED=1
- GOTOOLCHAIN=local
overrides:
- goos: android
goarch: arm
goarm: 7
env:
- CC=armv7a-linux-androideabi21-clang
- CXX=armv7a-linux-androideabi21-clang++
- goos: android
goarch: arm64
env:
- CC=aarch64-linux-android21-clang
- CXX=aarch64-linux-android21-clang++
- goos: android
goarch: 386
env:
- CC=i686-linux-android21-clang
- CXX=i686-linux-android21-clang++
- goos: android
goarch: amd64
goamd64: v1
env:
- CC=x86_64-linux-android21-clang
- CXX=x86_64-linux-android21-clang++
targets:
- android_arm_7
- android_arm64
- android_386
- android_amd64
- id: naive-purego-linux-amd64
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
- with_naive_outbound
- with_purego
env:
- CGO_ENABLED=0
- GOTOOLCHAIN=local
hooks:
post:
- cmd: go run -C {{ .Env.CRONET_GO_PATH }} ./cmd/build-naive extract-lib --target {{ .Os }}/{{ .Arch }} -o {{ dir .Path }}
env:
- CGO_ENABLED=0
targets:
- linux_amd64_v1
- id: naive-purego-linux-arm64
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
- with_naive_outbound
- with_purego
env:
- CGO_ENABLED=0
- GOTOOLCHAIN=local
hooks:
post:
- cmd: go run -C {{ .Env.CRONET_GO_PATH }} ./cmd/build-naive extract-lib --target {{ .Os }}/{{ .Arch }} -o {{ dir .Path }}
env:
- CGO_ENABLED=0
targets:
- linux_arm64
- id: naive-purego-windows-amd64
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
- with_naive_outbound
- with_purego
env:
- CGO_ENABLED=0
- GOTOOLCHAIN=local
hooks:
post:
- cmd: go run -C {{ .Env.CRONET_GO_PATH }} ./cmd/build-naive extract-lib --target {{ .Os }}/{{ .Arch }} -o {{ dir .Path }}
env:
- CGO_ENABLED=0
targets:
- windows_amd64_v1
- id: naive-purego-windows-arm64
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
- with_naive_outbound
- with_purego
env:
- CGO_ENABLED=0
- GOTOOLCHAIN=local
hooks:
post:
- cmd: go run -C {{ .Env.CRONET_GO_PATH }} ./cmd/build-naive extract-lib --target {{ .Os }}/{{ .Arch }} -o {{ dir .Path }}
env:
- CGO_ENABLED=0
targets:
- windows_arm64
- id: naive-glibc
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
- with_naive_outbound
env:
- CGO_ENABLED=1
- GOTOOLCHAIN=local
- CGO_LDFLAGS=-fuse-ld=lld -Wl,-z,notext -Wl,-z,execstack
- CC_linux_amd64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=x86_64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_amd64_staging
- CXX_linux_amd64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=x86_64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_amd64_staging
- CC_linux_arm64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=aarch64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_arm64_staging
- CXX_linux_arm64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=aarch64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_arm64_staging
- CC_linux_386={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=i686-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_i386_staging
- CXX_linux_386={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=i686-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_i386_staging
- CC_linux_arm={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=arm-linux-gnueabihf --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_armhf_staging
- CXX_linux_arm={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=arm-linux-gnueabihf --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_armhf_staging
- CC_linux_mips64le={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=mips64el-linux-gnuabi64 --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_mips64el_staging
- CXX_linux_mips64le={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=mips64el-linux-gnuabi64 --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/bullseye/bullseye_mips64el_staging
- CC_linux_riscv64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=riscv64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/trixie/trixie_riscv64_staging
- CXX_linux_riscv64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=riscv64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/trixie/trixie_riscv64_staging
- CC_linux_loong64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=loongarch64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/sid/sid_loong64_staging
- CXX_linux_loong64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=loongarch64-linux-gnu --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/sid/sid_loong64_staging
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
targets:
- linux_amd64_v1
- linux_arm64
- linux_386
- linux_arm_7
- linux_riscv64
- linux_loong64
- id: naive-musl
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_manager
- with_admin_panel
- with_profiler
- badlinkname
- tfogo_checklinkname0
- with_naive_outbound
- with_musl
env:
- CGO_ENABLED=1
- GOTOOLCHAIN=local
- CGO_LDFLAGS=-fuse-ld=lld -Wl,-z,notext -Wl,-z,execstack
- CC_linux_amd64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=x86_64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/x86_64
- CXX_linux_amd64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=x86_64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/x86_64
- CC_linux_arm64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=aarch64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/aarch64
- CXX_linux_arm64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=aarch64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/aarch64
- CC_linux_386={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=i486-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/i386_pentium4
- CXX_linux_386={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=i486-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/i386_pentium4
- CC_linux_arm={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=arm-openwrt-linux-musleabi --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/arm_cortex-a15_neon-vfpv4
- CXX_linux_arm={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=arm-openwrt-linux-musleabi --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/arm_cortex-a15_neon-vfpv4
- CC_linux_riscv64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=riscv64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/riscv64
- CXX_linux_riscv64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=riscv64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/23.05.5/riscv64
- CC_linux_loong64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang --target=loongarch64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/24.10.5/loongarch64
- CXX_linux_loong64={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/third_party/llvm-build/Release+Asserts/bin/clang++ --target=loongarch64-openwrt-linux-musl --sysroot={{ .Env.CRONET_GO_PATH }}/naiveproxy/src/out/sysroot-build/openwrt/24.10.5/loongarch64
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
targets:
- linux_amd64_v1
- linux_arm64
- linux_386
- linux_arm_7
- linux_riscv64
- linux_loong64
- id: compressed
<<: *template
targets:
- linux_386
- linux_amd64_v1
- linux_arm64
- linux_arm_6
- linux_arm_7
- linux_riscv64
- id: compressed-mips
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_trusttunnel
- with_call
- with_sudoku
- with_profiler
- badlinkname
- tfogo_checklinkname0
targets:
- linux_mips
- linux_mips_softfloat
- linux_mipsle
- linux_mipsle_softfloat
- id: compressed-android
<<: *template
env:
- CGO_ENABLED=1
- GOTOOLCHAIN=local
overrides:
- goos: android
goarch: arm
goarm: 7
env:
- CC=armv7a-linux-androideabi21-clang
- CXX=armv7a-linux-androideabi21-clang++
- goos: android
goarch: arm64
env:
- CC=aarch64-linux-android21-clang
- CXX=aarch64-linux-android21-clang++
- goos: android
goarch: 386
env:
- CC=i686-linux-android21-clang
- CXX=i686-linux-android21-clang++
- goos: android
goarch: amd64
goamd64: v1
env:
- CC=x86_64-linux-android21-clang
- CXX=x86_64-linux-android21-clang++
targets:
- android_arm_7
- android_arm64
- android_386
- android_amd64
- id: openwrt
<<: *template
hooks:
post:
- cmd: bash .github/build_openwrt_packages.sh "{{ .Version }}" "{{ .Target }}" "{{ .Path }}"
targets:
- linux_amd64_v1
- linux_arm64
- linux_386
- linux_arm_7
- linux_arm_6
- linux_riscv64
- linux_loong64
- id: openwrt-mips
<<: *template
tags:
- with_gvisor
- with_quic
- with_dhcp
- with_wireguard
- with_utls
- with_acme
- with_clash_api
- with_tailscale
- with_masque
- with_mtproxy
- with_ccm
- with_ocm
- with_trusttunnel
- with_call
- with_sudoku
- with_profiler
- badlinkname
- tfogo_checklinkname0
hooks:
post:
- cmd: bash .github/build_openwrt_packages.sh "{{ .Version }}" "{{ .Target }}" "{{ .Path }}"
targets:
- linux_arm_5
- linux_mips_softfloat
- linux_mips64_softfloat
- linux_mipsle_softfloat
- linux_mipsle_hardfloat
- linux_mips64le
upx:
- enabled: true
ids:
- compressed
- compressed-mips
- compressed-android
compress: best
lzma: true
archives:
- id: archive
format: tar.gz
- &template
id: archive
builds:
- main
- mips
- android
formats:
- tar.gz
format_overrides:
- goos: windows
format: zip
formats:
- zip
wrap_in_directory: true
files:
- LICENSE
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
nfpms:
- id: package
package_name: sing-box
file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
vendor: sagernet
homepage: https://sing-box.sagernet.org/
maintainer: nekohasekai <contact-git@sekai.icu>
description: The universal proxy platform.
license: GPLv3 or later
formats:
- deb
- rpm
priority: extra
contents:
- src: release/config/config.json
dst: /etc/sing-box/config.json
type: config
- src: release/config/sing-box.service
dst: /etc/systemd/system/sing-box.service
- src: release/config/sing-box@.service
dst: /etc/systemd/system/sing-box@.service
- src: LICENSE
dst: /usr/share/licenses/sing-box/LICENSE
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- id: archive-naive-purego-linux-amd64
<<: *template
builds:
- naive-purego-linux-amd64
files:
- LICENSE
- src: dist/naive-purego-linux-amd64_*/libcronet*
strip_parent: true
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}-purego'
- id: archive-naive-purego-linux-arm64
<<: *template
builds:
- naive-purego-linux-arm64
files:
- LICENSE
- src: dist/naive-purego-linux-arm64_*/libcronet*
strip_parent: true
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}-purego'
- id: archive-naive-purego-windows-amd64
<<: *template
builds:
- naive-purego-windows-amd64
files:
- LICENSE
- src: dist/naive-purego-windows-amd64_*/libcronet*
strip_parent: true
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}-purego'
- id: archive-naive-purego-windows-arm64
<<: *template
builds:
- naive-purego-windows-arm64
files:
- LICENSE
- src: dist/naive-purego-windows-arm64_*/libcronet*
strip_parent: true
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}-purego'
- id: archive-naive-glibc
<<: *template
builds:
- naive-glibc
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-glibc'
- id: archive-naive-musl
<<: *template
builds:
- naive-musl
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-musl'
- id: archive-compressed
<<: *template
builds:
- compressed
- compressed-mips
- compressed-android
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if and .Mips (not (eq .Mips "hardfloat")) }}-{{ .Mips }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}-compressed'
source:
enabled: false
name_template: '{{ .ProjectName }}-{{ .Version }}.source'
@@ -76,8 +535,19 @@ signs:
- artifacts: checksum
release:
github:
owner: SagerNet
name: sing-box
name_template: '{{ if .IsSnapshot }}{{ nightly }}{{ else }}{{ .Version }}{{ end }}'
owner: shtorm-7
name: sing-box-extended
draft: true
mode: replace
prerelease: auto
mode: replace
ids:
- archive
- archive-naive-glibc
- archive-naive-musl
- archive-naive-purego-linux-amd64
- archive-naive-purego-linux-arm64
- archive-naive-purego-windows-amd64
- archive-naive-purego-windows-arm64
- archive-compressed
- archive-openwrt
skip_upload: true
+24
View File
@@ -0,0 +1,24 @@
# Support the project
If you want to support the project, you can donate to the following addresses.
### TRX (Tron)
```
TSWU6VUZ4FcUghYDmbbhK15gRVvhvBgW3F
```
### TON
```
UQAyD2UuT5kCP6lZQlhFL0hyNibDXNE4nIo_RSLVSYAtD7N1
```
### Solana
```
CJu8ickwRCwNE71uVFjYf1UveyCkRp9Xo44rhPcQpeFL
```
### Bitcoin
```
bc1qqx97p8k4dchqkyd47s4vf74hrqdfnmhqvcja7x
```
### Ethereum
```
0xAcc5919C22F2B3fAa0ec7E8BaD142da5B375FBF6
```
+31
View File
@@ -0,0 +1,31 @@
FROM --platform=$BUILDPLATFORM golang:1.26 AS builder
LABEL maintainer="shtorm-7"
COPY . /go/src/github.com/sagernet/sing-box
WORKDIR /go/src/github.com/sagernet/sing-box
ARG TARGETOS TARGETARCH
ARG GOPROXY=""
ARG CRONET_GO_PATH=/go/src/github.com/sagernet/sing-box/cronet-go
ENV GOPROXY=${GOPROXY}
ENV CGO_ENABLED=1
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH
ENV CRONET_GO_PATH=${CRONET_GO_PATH}
RUN set -ex \
&& git config --global --add safe.directory /go/src/github.com/sagernet/sing-box \
&& export GOTOOLCHAIN=local \
&& export CGO_ENABLED=1 GOOS=$TARGETOS GOARCH=$TARGETARCH \
&& eval "$(CGO_ENABLED=0 GOOS= GOARCH= go run -C "$CRONET_GO_PATH" ./cmd/build-naive --target=$GOOS/$GOARCH --libc=musl env --export)" \
&& export CGO_LDFLAGS="$CGO_LDFLAGS -Wl,-z,notext -Wl,-z,execstack" \
&& export VERSION=$(CGO_ENABLED=0 GOOS= GOARCH= go run ./cmd/internal/read_tag) \
&& export TAGS=$(cat release/DEFAULT_BUILD_TAGS_DOCKER) \
&& export LDFLAGS_SHARED=$(cat release/LDFLAGS) \
&& go build -v -trimpath -tags "$TAGS" \
-o /go/bin/sing-box \
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" $LDFLAGS_SHARED -s -w -buildid=" \
./cmd/sing-box
FROM --platform=$TARGETPLATFORM alpine AS dist
LABEL maintainer="shtorm-7"
RUN set -ex \
&& apk add --no-cache --upgrade bash tzdata ca-certificates nftables
COPY --from=builder /go/bin/sing-box /usr/local/bin/sing-box
ENTRYPOINT ["sing-box"]
+14
View File
@@ -0,0 +1,14 @@
ARG BASE_IMAGE=alpine
FROM ${BASE_IMAGE}
ARG TARGETARCH
ARG TARGETVARIANT
LABEL maintainer="nekohasekai <contact-git@sekai.icu>"
RUN set -ex \
&& if command -v apk > /dev/null; then \
apk add --no-cache --upgrade bash tzdata ca-certificates nftables; \
else \
apt-get update && apt-get install -y --no-install-recommends bash tzdata ca-certificates nftables \
&& rm -rf /var/lib/apt/lists/*; \
fi
COPY sing-box-${TARGETARCH}${TARGETVARIANT} /usr/local/bin/sing-box
ENTRYPOINT ["sing-box"]
+4 -1
View File
@@ -11,4 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
In addition, no derivative work may use the name or imply association
with this application without prior consent.
+304 -32
View File
@@ -1,70 +1,342 @@
NAME = sing-box
COMMIT = $(shell git rev-parse --short HEAD)
TAGS ?= with_quic,with_wireguard,with_clash_api
PARAMS = -v -trimpath -tags '$(TAGS)' -ldflags \
'-X "github.com/sagernet/sing-box/constant.Commit=$(COMMIT)" \
-w -s -buildid='
MAIN = ./cmd/sing-box
TAGS ?= $(shell cat release/DEFAULT_BUILD_TAGS_OTHERS)
.PHONY: test release
GOHOSTOS = $(shell go env GOHOSTOS)
GOHOSTARCH = $(shell go env GOHOSTARCH)
VERSION=$(shell CGO_ENABLED=0 GOOS=$(GOHOSTOS) GOARCH=$(GOHOSTARCH) go run github.com/sagernet/sing-box/cmd/internal/read_tag@latest)
LDFLAGS_SHARED = $(shell cat release/LDFLAGS)
PARAMS = -v -trimpath -ldflags "-X 'github.com/sagernet/sing-box/constant.Version=$(VERSION)' $(LDFLAGS_SHARED) -s -w -buildid="
MAIN_PARAMS = $(PARAMS) -tags "$(TAGS)"
MAIN = ./cmd/sing-box
PREFIX ?= $(shell go env GOPATH)
SING_FFI ?= sing-ffi
LIBBOX_FFI_CONFIG ?= ./experimental/libbox/ffi.json
ADMIN_PANEL_DIR = service/admin_panel
ADMIN_PANEL_WEB = $(ADMIN_PANEL_DIR)/web
ADMIN_PANEL_DIST = $(ADMIN_PANEL_DIR)/dist
ADMIN_PANEL_TAGS = $(TAGS),with_admin_panel
DOCKER_IMAGE ?= shtorm7/sing-box-extended
DOCKER_PLATFORMS ?= linux/amd64,linux/arm64
CRONET_GO_PATH ?= $(shell pwd)/cronet-go
.PHONY: test release docs build schema
build:
go build $(PARAMS) $(MAIN)
go build $(MAIN_PARAMS) $(MAIN)
build_admin_panel:
cd $(ADMIN_PANEL_WEB) && \
npm install --no-fund --no-audit && \
npm run build
go run ./cmd/internal/admin_panel_pack \
-dir $(ADMIN_PANEL_DIST)
build_naive:
cd $(CRONET_GO_PATH) && \
for arch in amd64 arm64 386 arm mipsle mips64le riscv64 loong64; do \
go run ./cmd/build-naive --target=linux/$$arch download-toolchain; \
done && \
for arch in amd64 arm64 386 arm mipsle riscv64 loong64; do \
go run ./cmd/build-naive --target=linux/$$arch --libc=musl download-toolchain; \
done
race:
export GOTOOLCHAIN=local && \
go build -race $(MAIN_PARAMS) $(MAIN)
ci_build:
export GOTOOLCHAIN=local && \
go build $(PARAMS) $(MAIN) && \
go build $(MAIN_PARAMS) $(MAIN)
generate_completions:
go run -v --tags "$(TAGS),generate,generate_completions" $(MAIN)
schema:
go run -ldflags "$(LDFLAGS_SHARED)" --tags "$(TAGS)" $(MAIN) schema -o docs/schema.json
install:
go install $(PARAMS) $(MAIN)
go build -o $(PREFIX)/bin/$(NAME) $(MAIN_PARAMS) $(MAIN)
fmt:
@gofumpt -l -w .
@gofmt -s -w .
@gci write -s "standard,prefix(github.com/sagernet/),default" .
@golangci-lint fmt
fmt_install:
go install -v mvdan.cc/gofumpt@latest
go install -v github.com/daixiang0/gci@v0.4.0
fmt_docs:
go run ./cmd/internal/format_docs
lint:
GOOS=linux golangci-lint run ./...
GOOS=android golangci-lint run ./...
GOOS=windows golangci-lint run ./...
GOOS=darwin golangci-lint run ./...
GOOS=freebsd golangci-lint run ./...
# GOOS=freebsd golangci-lint run ./...
lint_install:
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install -v github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
proto:
@go run ./cmd/internal/protogen
@gofumpt -l -w .
@gofumpt -l -w .
@golangci-lint fmt
proto_install:
go install -v google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
snapshot:
goreleaser release --rm-dist --snapshot
mkdir dist/release
mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/release
ghr --delete --draft --prerelease -p 1 nightly dist/release
rm -r dist
update_certificates:
go run ./cmd/internal/update_certificates
snapshot_install:
go install -v github.com/goreleaser/goreleaser@latest
release: build_admin_panel build_naive
CRONET_GO_PATH=$(CRONET_GO_PATH) go run ./cmd/internal/build goreleaser release --skip=validate --clean -p 3 --skip publish
mkdir dist/release
mv dist/*.tar.gz \
dist/*.zip \
dist/*.ipk \
dist/*.apk \
dist/release
ghr --replace --draft --prerelease -p 5 "v${VERSION}" dist/release
./codeberg-release.sh --replace --draft --prerelease -p 5 "v${VERSION}" dist/release
rm -r dist/release
release_repo:
go run ./cmd/internal/build goreleaser release -f .goreleaser.fury.yaml --clean
release_install:
go install -v github.com/tcnksm/ghr@latest
release_docker:
sudo docker buildx build \
--platform $(DOCKER_PLATFORMS) \
-t $(DOCKER_IMAGE):latest \
-t $(DOCKER_IMAGE):$(VERSION) \
--push \
--network=host \
.
update_android_version:
go run ./cmd/internal/update_android_version
update_desktop_version:
go run ./cmd/internal/update_desktop_version
build_android:
cd ../sing-box-for-android && ./gradlew :app:clean :app:assembleOtherRelease && ./gradlew --stop
upload_android:
mkdir -p dist/release_android
cp ../sing-box-for-android/app/build/outputs/apk/other/release/*.apk dist/release_android
VERSION_CODE=$$(grep VERSION_CODE ../sing-box-for-android/version.properties | cut -d= -f2); \
VERSION_NAME=$$(grep VERSION_NAME ../sing-box-for-android/version.properties | cut -d= -f2); \
printf '{\n "version_code": %s,\n "version_name": "%s"\n}\n' "$$VERSION_CODE" "$$VERSION_NAME" > dist/release_android/SFA-version-metadata.json
ghr --replace --draft --prerelease -p 5 "v${VERSION}" dist/release_android
./codeberg-release.sh --replace --draft --prerelease -p 5 "v${VERSION}" dist/release_android
rm -rf dist/release_android
release_android: lib_android update_android_version build_android upload_android
publish_android:
cd ../sing-box-for-android && ./gradlew :app:publishPlayReleaseBundle && ./gradlew --stop
build_desktop_windows:
cd ../sing-box-for-desktop && pnpm install --frozen-lockfile && pnpm run package:win
build_desktop_linux:
cd ../sing-box-for-desktop && pnpm install --frozen-lockfile && pnpm run package:linux
upload_desktop:
mkdir -p dist/release_desktop
cp ../sing-box-for-desktop/release/SFW-*.exe dist/release_desktop 2>/dev/null || true
cp ../sing-box-for-desktop/release/SFL-*.deb ../sing-box-for-desktop/release/SFL-*.rpm ../sing-box-for-desktop/release/SFL-*.pkg.tar.zst dist/release_desktop 2>/dev/null || true
ghr --replace --draft --prerelease -p 5 "v${VERSION}" dist/release_desktop
./codeberg-release.sh --replace --draft --prerelease -p 5 "v${VERSION}" dist/release_desktop
rm -rf dist/release_desktop
release_desktop: update_desktop_version build_desktop_windows build_desktop_linux upload_desktop
# TODO: find why and remove `-destination 'generic/platform=iOS'`
# TODO: remove xcode clean when fix control widget fixed
build_ios:
cd ../sing-box-for-apple && \
rm -rf build/SFI.xcarchive && \
xcodebuild clean -scheme SFI -derivedDataPath build/SFI.dd && \
xcodebuild archive -scheme SFI -configuration Release -destination 'generic/platform=iOS' -archivePath build/SFI.xcarchive -derivedDataPath build/SFI.dd -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"
upload_ios_app_store:
cd ../sing-box-for-apple && \
xcodebuild -exportArchive -archivePath build/SFI.xcarchive -exportOptionsPlist SFI/Upload.plist -allowProvisioningUpdates
build_ios_deb:
$(MAKE) -C ../sing-box-for-apple build_ios_deb
upload_ios_deb:
ghr --replace --draft --prerelease "v${VERSION}" ../sing-box-for-apple/build/jailbreak/"SFI-${VERSION}-iphoneos-arm64.deb"
release_ios: build_ios upload_ios_app_store
release_ios_deb: build_ios_deb upload_ios_deb
build_macos:
cd ../sing-box-for-apple && \
rm -rf build/SFM.xcarchive && \
xcodebuild archive -scheme SFM -configuration Release -archivePath build/SFM.xcarchive -derivedDataPath build/SFM.dd -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"
upload_macos_app_store:
cd ../sing-box-for-apple && \
xcodebuild -exportArchive -archivePath build/SFM.xcarchive -exportOptionsPlist SFI/Upload.plist -allowProvisioningUpdates
release_macos: build_macos upload_macos_app_store
build_macos_standalone:
$(MAKE) -C ../sing-box-for-apple archive_macos_standalone
build_macos_dmg:
$(MAKE) -C ../sing-box-for-apple build_macos_dmg
build_macos_pkg:
$(MAKE) -C ../sing-box-for-apple build_macos_pkg
notarize_macos_dmg:
$(MAKE) -C ../sing-box-for-apple notarize_macos_dmg
notarize_macos_pkg:
$(MAKE) -C ../sing-box-for-apple notarize_macos_pkg
upload_macos_dmg:
mkdir -p dist/SFM
cp ../sing-box-for-apple/build/SFM-Apple.dmg "dist/SFM/SFM-${VERSION}-Apple.dmg"
cp ../sing-box-for-apple/build/SFM-Intel.dmg "dist/SFM/SFM-${VERSION}-Intel.dmg"
cp ../sing-box-for-apple/build/SFM-Universal.dmg "dist/SFM/SFM-${VERSION}-Universal.dmg"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}-Apple.dmg"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}-Intel.dmg"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}-Universal.dmg"
upload_macos_pkg:
mkdir -p dist/SFM
cp ../sing-box-for-apple/build/SFM-Apple.pkg "dist/SFM/SFM-${VERSION}-Apple.pkg"
cp ../sing-box-for-apple/build/SFM-Intel.pkg "dist/SFM/SFM-${VERSION}-Intel.pkg"
cp ../sing-box-for-apple/build/SFM-Universal.pkg "dist/SFM/SFM-${VERSION}-Universal.pkg"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}-Apple.pkg"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}-Intel.pkg"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}-Universal.pkg"
replace_macos_pkg:
mkdir -p dist/SFM
cp ../sing-box-for-apple/build/SFM-Apple.pkg "dist/SFM/SFM-${VERSION}-Apple.pkg"
cp ../sing-box-for-apple/build/SFM-Intel.pkg "dist/SFM/SFM-${VERSION}-Intel.pkg"
cp ../sing-box-for-apple/build/SFM-Universal.pkg "dist/SFM/SFM-${VERSION}-Universal.pkg"
ghr --replace "v${VERSION}" "dist/SFM/SFM-${VERSION}-Apple.pkg"
ghr --replace "v${VERSION}" "dist/SFM/SFM-${VERSION}-Intel.pkg"
ghr --replace "v${VERSION}" "dist/SFM/SFM-${VERSION}-Universal.pkg"
upload_macos_dsyms:
mkdir -p dist/SFM
cd ../sing-box-for-apple/build/SFM.System-universal.xcarchive && zip -r SFM.dSYMs.zip dSYMs
cp ../sing-box-for-apple/build/SFM.System-universal.xcarchive/SFM.dSYMs.zip "dist/SFM/SFM-${VERSION}.dSYMs.zip"
ghr --replace --draft --prerelease "v${VERSION}" "dist/SFM/SFM-${VERSION}.dSYMs.zip"
replace_macos_dsyms:
mkdir -p dist/SFM
cd ../sing-box-for-apple/build/SFM.System-universal.xcarchive && zip -r SFM.dSYMs.zip dSYMs
cp ../sing-box-for-apple/build/SFM.System-universal.xcarchive/SFM.dSYMs.zip "dist/SFM/SFM-${VERSION}.dSYMs.zip"
ghr --replace "v${VERSION}" "dist/SFM/SFM-${VERSION}.dSYMs.zip"
release_macos_standalone: build_macos_pkg notarize_macos_pkg upload_macos_pkg upload_macos_dsyms
replace_macos_standalone: build_macos_pkg notarize_macos_pkg upload_macos_pkg upload_macos_dsyms
build_tvos:
cd ../sing-box-for-apple && \
rm -rf build/SFT.xcarchive && \
xcodebuild archive -scheme SFT -configuration Release -archivePath build/SFT.xcarchive -derivedDataPath build/SFT.dd -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌"
upload_tvos_app_store:
cd ../sing-box-for-apple && \
xcodebuild -exportArchive -archivePath "build/SFT.xcarchive" -exportOptionsPlist SFI/Upload.plist -allowProvisioningUpdates
export_tvos_ipa:
cd ../sing-box-for-apple && \
xcodebuild -exportArchive -archivePath "build/SFT.xcarchive" -exportOptionsPlist SFI/Export.plist -allowProvisioningUpdates -exportPath build/SFT && \
cp build/SFT/sing-box.ipa dist/SFT.ipa
upload_tvos_ipa:
cd dist && \
cp SFT.ipa "SFT-${VERSION}.ipa" && \
ghr --replace --draft --prerelease "v${VERSION}" "SFT-${VERSION}.ipa"
release_tvos: build_tvos upload_tvos_app_store
update_apple_version:
go run ./cmd/internal/update_apple_version
update_macos_version:
MACOS_PROJECT_VERSION=$(shell go run -v ./cmd/internal/app_store_connect next_macos_project_version) go run ./cmd/internal/update_apple_version
release_apple: lib_apple update_apple_version release_ios release_macos release_tvos release_macos_standalone
release_apple_beta: update_apple_version release_ios release_macos release_tvos
publish_testflight:
go run -v ./cmd/internal/app_store_connect publish_testflight $(filter-out $@,$(MAKECMDGOALS))
prepare_app_store:
go run -v ./cmd/internal/app_store_connect prepare_app_store
publish_app_store:
go run -v ./cmd/internal/app_store_connect publish_app_store
test:
@go test -v . && \
pushd test && \
@go test -v ./... && \
cd test && \
go mod tidy && \
go test -v -tags with_quic,with_wireguard,with_grpc . && \
popd
go test -v -tags "$(TAGS_TEST)" .
test_stdio:
@go test -v ./... && \
cd test && \
go mod tidy && \
go test -v -tags "$(TAGS_TEST),force_stdio" .
lib_android:
go run ./cmd/internal/build_libbox -target android
lib_apple:
go run ./cmd/internal/build_libbox -target apple
lib_windows:
$(SING_FFI) generate --config $(LIBBOX_FFI_CONFIG) --platform-type csharp
lib_android_new:
$(SING_FFI) generate --config $(LIBBOX_FFI_CONFIG) --platform-type android
lib_apple_new:
$(SING_FFI) generate --config $(LIBBOX_FFI_CONFIG) --platform-type apple
lib_install:
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.1.13
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.1.13
docs:
venv/bin/mkdocs serve
publish_docs:
venv/bin/mkdocs gh-deploy -m "Update" --force --ignore-version --no-history
docs_install:
python3 -m venv venv
source ./venv/bin/activate && pip install --force-reinstall mkdocs-material=="9.7.2" mkdocs-static-i18n=="1.2.*"
clean:
rm -rf bin dist
rm -rf bin dist sing-box
rm -f $(shell go env GOPATH)/sing-box
update:
git fetch
git reset FETCH_HEAD --hard
git clean -fdx
git clean -fdx
%:
@:
+95 -5
View File
@@ -1,10 +1,97 @@
# sing-box
# sing-box-extended
The universal proxy platform.
[![license](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)
[![go](https://img.shields.io/badge/go-1.26-00ADD8.svg)](go.mod)
[![codeberg](https://img.shields.io/badge/mirror-codeberg-2185D0.svg)](https://codeberg.org/shtorm-7/sing-box-extended)
[![telegram](https://img.shields.io/badge/telegram-chat-26A5E4.svg?logo=telegram)](https://t.me/sing_box_extended)
## Documentation
Sing-box with extended features.
https://sing-box.sagernet.org
## 🔥 Features
### Protocols
- **WARP** — Cloudflare WARP integration through WireGuard
- **MASQUE** — Cloudflare MASQUE proxy over QUIC / HTTP-2
- **MTProxy** — Telegram MTProxy server with FakeTLS and domain fronting
- **Mieru** — Secure, hard to classify, hard to probe network protocol
- **TrustTunnel** — AdGuard's obfuscated VPN protocol, indistinguishable from HTTPS traffic
- **Sudoku** — Traffic obfuscation protocol based on 4×4 Sudoku puzzles with low-entropy fingerprints
- **SSH** — SSH client and server with certificate authentication and upstream fallback
- **Call** — Traffic tunneling through video-call platforms (VK, Dion, Telemost, WBStream)
- **VPN** — Routed tunnel over any sing-box protocol
- **Bond** — Link aggregation for increasing throughput
- **Fallback** — Outbound group with priority-based switching
- **Failover** — Automatic outbound switching with session recovery for high availability
### DNS
- **SDNS (DNSCrypt)** — Encrypted DNS queries for enhanced privacy
- **DNS Fallback** — Sequential / parallel queries across upstream resolvers
### Limiters
- **Bandwidth Limiter** — Upload / download / bidirectional rate limiting
- **Connection Limiter** — Concurrent connection control
- **Traffic Limiter** — Per-user traffic quotas
- **Rate Limiter** — Request rate limiting
### Encryption & Obfuscation
- **Amnezia 3.1** — WireGuard traffic obfuscation
- **VLESS encryption** — XRAY encryption for VLESS protocol
### Transports
- **mKCP** — Reliable UDP-based transport
- **XHTTP** — Modern XRAY transport
- **Rmux** — Improved smux multiplexer
### Services
- **Admin Panel** — Web-based management interface
- **Manager** — Management service for configuring users, nodes, limiters
- **Manager API (HTTP/gRPC)** — HTTP and gRPC API for the Manager
- **Node Manager API** — Service for connecting nodes to remote manager
### Miscellaneous
- **Providers** — Outbound subscriptions from local files, inline lists, or remote URLs (sing-box JSON, Clash YAML, SIP008, share links)
- **Link Parser** — Outbound configured from a share link (VLESS, VMess, Shadowsocks, Trojan, Hysteria, Hysteria2, TUIC, AnyTLS)
- **Extended WireGuard options** — Advanced configuration capabilities
- **Unified Delay** — Unified latency measurement
## 📚 Examples
Configuration examples are available here:
https://github.com/shtorm-7/sing-box-extended/tree/extended/examples
## Support the Project
If you want to support the project, you can donate to the following addresses.
#### Tribute
**[RUB Donate](https://web.tribute.tg/d/JxY)**
**[EUR Donate](https://web.tribute.tg/d/JxZ)**
**[USD Donate](https://web.tribute.tg/d/Jy1)**
#### TRX (Tron)
```
TSWU6VUZ4FcUghYDmbbhK15gRVvhvBgW3F
```
#### TON
```
UQAyD2UuT5kCP6lZQlhFL0hyNibDXNE4nIo_RSLVSYAtD7N1
```
#### Solana
```
CJu8ickwRCwNE71uVFjYf1UveyCkRp9Xo44rhPcQpeFL
```
#### Bitcoin
```
bc1qqx97p8k4dchqkyd47s4vf74hrqdfnmhqvcja7x
```
#### Ethereum
```
0xAcc5919C22F2B3fAa0ec7E8BaD142da5B375FBF6
```
## License
@@ -23,4 +110,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
```
In addition, no derivative work may use the name or imply association
with this application without prior consent.
```
+22
View File
@@ -0,0 +1,22 @@
package adapter
import (
"context"
"crypto/x509"
"github.com/sagernet/sing/service"
)
type CertificateStore interface {
LifecycleService
Pool() *x509.CertPool
ExclusiveAnchors() bool
}
func RootPoolFromContext(ctx context.Context) *x509.CertPool {
store := service.FromContext[CertificateStore](ctx)
if store == nil {
return nil
}
return store.Pool()
}
+21
View File
@@ -0,0 +1,21 @@
package certificate
type Adapter struct {
providerType string
providerTag string
}
func NewAdapter(providerType string, providerTag string) Adapter {
return Adapter{
providerType: providerType,
providerTag: providerTag,
}
}
func (a *Adapter) Type() string {
return a.providerType
}
func (a *Adapter) Tag() string {
return a.providerTag
}
+158
View File
@@ -0,0 +1,158 @@
package certificate
import (
"context"
"os"
"sync"
"time"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/taskmonitor"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
)
var _ adapter.CertificateProviderManager = (*Manager)(nil)
type Manager struct {
logger log.ContextLogger
registry adapter.CertificateProviderRegistry
access sync.Mutex
started bool
stage adapter.StartStage
providers []adapter.CertificateProviderService
providerByTag map[string]adapter.CertificateProviderService
}
func NewManager(logger log.ContextLogger, registry adapter.CertificateProviderRegistry) *Manager {
return &Manager{
logger: logger,
registry: registry,
providerByTag: make(map[string]adapter.CertificateProviderService),
}
}
func (m *Manager) Start(stage adapter.StartStage) error {
m.access.Lock()
if m.started && m.stage >= stage {
panic("already started")
}
m.started = true
m.stage = stage
providers := m.providers
m.access.Unlock()
for _, provider := range providers {
name := "certificate-provider/" + provider.Type() + "[" + provider.Tag() + "]"
m.logger.Trace(stage, " ", name)
startTime := time.Now()
err := adapter.LegacyStart(provider, stage)
if err != nil {
return E.Cause(err, stage, " ", name)
}
m.logger.Trace(stage, " ", name, " completed (", F.Seconds(time.Since(startTime).Seconds()), "s)")
}
return nil
}
func (m *Manager) Close() error {
m.access.Lock()
defer m.access.Unlock()
if !m.started {
return nil
}
m.started = false
providers := m.providers
m.providers = nil
monitor := taskmonitor.New(m.logger, C.StopTimeout)
var err error
for _, provider := range providers {
name := "certificate-provider/" + provider.Type() + "[" + provider.Tag() + "]"
m.logger.Trace("close ", name)
startTime := time.Now()
monitor.Start("close ", name)
err = E.Append(err, provider.Close(), func(err error) error {
return E.Cause(err, "close ", name)
})
monitor.Finish()
m.logger.Trace("close ", name, " completed (", F.Seconds(time.Since(startTime).Seconds()), "s)")
}
return err
}
func (m *Manager) CertificateProviders() []adapter.CertificateProviderService {
m.access.Lock()
defer m.access.Unlock()
return m.providers
}
func (m *Manager) Get(tag string) (adapter.CertificateProviderService, bool) {
m.access.Lock()
provider, found := m.providerByTag[tag]
m.access.Unlock()
return provider, found
}
func (m *Manager) Remove(tag string) error {
m.access.Lock()
provider, found := m.providerByTag[tag]
if !found {
m.access.Unlock()
return os.ErrInvalid
}
delete(m.providerByTag, tag)
index := common.Index(m.providers, func(it adapter.CertificateProviderService) bool {
return it == provider
})
if index == -1 {
panic("invalid certificate provider index")
}
m.providers = append(m.providers[:index], m.providers[index+1:]...)
started := m.started
m.access.Unlock()
if started {
return provider.Close()
}
return nil
}
func (m *Manager) Create(ctx context.Context, logger log.ContextLogger, tag string, providerType string, options any) error {
provider, err := m.registry.Create(ctx, logger, tag, providerType, options)
if err != nil {
return err
}
m.access.Lock()
defer m.access.Unlock()
if m.started {
name := "certificate-provider/" + provider.Type() + "[" + provider.Tag() + "]"
for _, stage := range adapter.ListStartStages {
m.logger.Trace(stage, " ", name)
startTime := time.Now()
err = adapter.LegacyStart(provider, stage)
if err != nil {
return E.Cause(err, stage, " ", name)
}
m.logger.Trace(stage, " ", name, " completed (", F.Seconds(time.Since(startTime).Seconds()), "s)")
}
}
if existsProvider, loaded := m.providerByTag[tag]; loaded {
if m.started {
err = existsProvider.Close()
if err != nil {
return E.Cause(err, "close certificate-provider/", existsProvider.Type(), "[", existsProvider.Tag(), "]")
}
}
existsIndex := common.Index(m.providers, func(it adapter.CertificateProviderService) bool {
return it == existsProvider
})
if existsIndex == -1 {
panic("invalid certificate provider index")
}
m.providers = append(m.providers[:existsIndex], m.providers[existsIndex+1:]...)
}
m.providers = append(m.providers, provider)
m.providerByTag[tag] = provider
return nil
}
+80
View File
@@ -0,0 +1,80 @@
package certificate
import (
"context"
"maps"
"slices"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
type ConstructorFunc[T any] func(ctx context.Context, logger log.ContextLogger, tag string, options T) (adapter.CertificateProviderService, error)
func Register[Options any](registry *Registry, providerType string, constructor ConstructorFunc[Options]) {
registry.register(providerType, func() any {
return new(Options)
}, func(ctx context.Context, logger log.ContextLogger, tag string, rawOptions any) (adapter.CertificateProviderService, error) {
var options *Options
if rawOptions != nil {
options = rawOptions.(*Options)
}
return constructor(ctx, logger, tag, common.PtrValueOrDefault(options))
})
}
var _ adapter.CertificateProviderRegistry = (*Registry)(nil)
type (
optionsConstructorFunc func() any
constructorFunc func(ctx context.Context, logger log.ContextLogger, tag string, options any) (adapter.CertificateProviderService, error)
)
type Registry struct {
access sync.Mutex
optionsType map[string]optionsConstructorFunc
constructor map[string]constructorFunc
}
func NewRegistry() *Registry {
return &Registry{
optionsType: make(map[string]optionsConstructorFunc),
constructor: make(map[string]constructorFunc),
}
}
func (m *Registry) OptionTypes() []string {
m.access.Lock()
defer m.access.Unlock()
return slices.Sorted(maps.Keys(m.optionsType))
}
func (m *Registry) CreateOptions(providerType string) (any, bool) {
m.access.Lock()
defer m.access.Unlock()
optionsConstructor, loaded := m.optionsType[providerType]
if !loaded {
return nil, false
}
return optionsConstructor(), true
}
func (m *Registry) Create(ctx context.Context, logger log.ContextLogger, tag string, providerType string, options any) (adapter.CertificateProviderService, error) {
m.access.Lock()
defer m.access.Unlock()
constructor, loaded := m.constructor[providerType]
if !loaded {
return nil, E.New("certificate provider type not found: " + providerType)
}
return constructor(ctx, logger, tag, options)
}
func (m *Registry) register(providerType string, optionsConstructor optionsConstructorFunc, constructor constructorFunc) {
m.access.Lock()
defer m.access.Unlock()
m.optionsType[providerType] = optionsConstructor
m.constructor[providerType] = constructor
}
+17
View File
@@ -0,0 +1,17 @@
//go:build darwin && cgo
package adapter
import "unsafe"
type AppleAnchors interface {
Retain() AppleAnchors
Release()
// Ref returns the underlying CFArrayRef, or nil if the anchor set is empty.
Ref() unsafe.Pointer
}
type AppleCertificateStore interface {
CertificateStore
AppleAnchors() AppleAnchors
}
+38
View File
@@ -0,0 +1,38 @@
package adapter
import (
"context"
"crypto/tls"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
)
type CertificateProvider interface {
GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)
}
type ACMECertificateProvider interface {
CertificateProvider
GetACMENextProtos() []string
}
type CertificateProviderService interface {
Lifecycle
Type() string
Tag() string
CertificateProvider
}
type CertificateProviderRegistry interface {
option.CertificateProviderOptionsRegistry
Create(ctx context.Context, logger log.ContextLogger, tag string, providerType string, options any) (CertificateProviderService, error)
}
type CertificateProviderManager interface {
Lifecycle
CertificateProviders() []CertificateProviderService
Get(tag string) (CertificateProviderService, bool)
Remove(tag string) error
Create(ctx context.Context, logger log.ContextLogger, tag string, providerType string, options any) error
}
+18
View File
@@ -0,0 +1,18 @@
package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
type ConnectionManager interface {
Lifecycle
Count() int
CloseAll()
TrackConn(conn net.Conn) net.Conn
TrackPacketConn(conn net.PacketConn) net.PacketConn
NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
}
+116
View File
@@ -0,0 +1,116 @@
package adapter
import (
"context"
"net/netip"
"time"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
"github.com/sagernet/sing/service"
"github.com/miekg/dns"
)
type DNSRouter interface {
Lifecycle
Exchange(ctx context.Context, message *dns.Msg, options DNSQueryOptions) (*dns.Msg, error)
ExchangeAsync(ctx context.Context, message *dns.Msg, options DNSQueryOptions, callback func(response *dns.Msg, err error))
Lookup(ctx context.Context, domain string, options DNSQueryOptions) ([]netip.Addr, error)
ClearCache()
LookupReverseMapping(ip netip.Addr) (string, bool)
ResetNetwork()
}
type DNSClient interface {
Start()
Exchange(ctx context.Context, transport DNSTransport, message *dns.Msg, options DNSQueryOptions, responseChecker func(response *dns.Msg) bool) (*dns.Msg, error)
ExchangeAsync(ctx context.Context, transport DNSTransport, message *dns.Msg, options DNSQueryOptions, responseChecker func(response *dns.Msg) bool, callback func(response *dns.Msg, err error))
Lookup(ctx context.Context, transport DNSTransport, domain string, options DNSQueryOptions, responseChecker func(response *dns.Msg) bool) ([]netip.Addr, error)
ClearCache()
}
type DNSQueryOptions struct {
Transport DNSTransport
Strategy C.DomainStrategy
LookupStrategy C.DomainStrategy
DisableCache bool
DisableOptimisticCache bool
RewriteTTL *uint32
Timeout time.Duration
ClientSubnet netip.Prefix
RemoveClientSubnet bool
}
func DNSQueryOptionsFrom(ctx context.Context, options *option.DomainResolveOptions) (DNSQueryOptions, error) {
if options == nil || options.Server == "" {
return DNSQueryOptions{}, nil
}
transportManager := service.FromContext[DNSTransportManager](ctx)
transport, loaded := transportManager.Transport(options.Server)
if !loaded {
return DNSQueryOptions{}, E.New("domain resolver not found: " + options.Server)
}
return DNSQueryOptions{
Transport: transport,
Strategy: C.DomainStrategy(options.Strategy),
DisableCache: options.DisableCache,
DisableOptimisticCache: options.DisableOptimisticCache,
RewriteTTL: options.RewriteTTL,
Timeout: time.Duration(options.Timeout),
ClientSubnet: options.ClientSubnet.Build(netip.Prefix{}),
}, nil
}
type RDRCStore interface {
LoadRDRC(transportName string, qName string, qType uint16) (rejected bool)
SaveRDRC(transportName string, qName string, qType uint16) error
SaveRDRCAsync(transportName string, qName string, qType uint16, logger logger.Logger)
}
type DNSCacheStore interface {
LoadDNSCache(transportName string, qName string, qType uint16) (rawMessage []byte, expireAt time.Time, loaded bool)
SaveDNSCache(transportName string, qName string, qType uint16, rawMessage []byte, expireAt time.Time) error
SaveDNSCacheAsync(transportName string, qName string, qType uint16, rawMessage []byte, expireAt time.Time, logger logger.Logger)
ClearDNSCache() error
}
type DNSTransport interface {
Lifecycle
Type() string
Tag() string
Dependencies() []string
// Reset closes the transport's existing connections so later requests use fresh connections.
// Exchanges that are currently using those connections may fail.
Reset()
Exchange(ctx context.Context, message *dns.Msg) (*dns.Msg, error)
ExchangeAsync(ctx context.Context, message *dns.Msg, callback func(response *dns.Msg, err error))
}
type DNSTransportWithPreferredDomain interface {
DNSTransport
PreferredDomain(domain string) bool
}
type DNSTransportWithEnvironment interface {
DNSTransport
Environment() []string
}
type DNSTransportRegistry interface {
option.DNSTransportOptionsRegistry
CreateDNSTransport(ctx context.Context, logger log.ContextLogger, tag string, transportType string, options any) (DNSTransport, error)
}
type DNSTransportManager interface {
Lifecycle
Transports() []DNSTransport
Transport(tag string) (DNSTransport, bool)
Default() DNSTransport
FakeIP() FakeIPTransport
Remove(tag string) error
Create(ctx context.Context, logger log.ContextLogger, tag string, outboundType string, options any) error
}
+28
View File
@@ -0,0 +1,28 @@
package adapter
import (
"context"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
)
type Endpoint interface {
Lifecycle
Type() string
Tag() string
Outbound
}
type EndpointRegistry interface {
option.EndpointOptionsRegistry
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, endpointType string, options any) (Endpoint, error)
}
type EndpointManager interface {
Lifecycle
Endpoints() []Endpoint
Get(tag string) (Endpoint, bool)
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, endpointType string, options any) error
}
+43
View File
@@ -0,0 +1,43 @@
package endpoint
import "github.com/sagernet/sing-box/option"
type Adapter struct {
endpointType string
endpointTag string
network []string
dependencies []string
}
func NewAdapter(endpointType string, endpointTag string, network []string, dependencies []string) Adapter {
return Adapter{
endpointType: endpointType,
endpointTag: endpointTag,
network: network,
dependencies: dependencies,
}
}
func NewAdapterWithDialerOptions(endpointType string, endpointTag string, network []string, dialOptions option.DialerOptions) Adapter {
var dependencies []string
if dialOptions.Detour != "" {
dependencies = []string{dialOptions.Detour}
}
return NewAdapter(endpointType, endpointTag, network, dependencies)
}
func (a *Adapter) Type() string {
return a.endpointType
}
func (a *Adapter) Tag() string {
return a.endpointTag
}
func (a *Adapter) Network() []string {
return a.network
}
func (a *Adapter) Dependencies() []string {
return a.dependencies
}
+158
View File
@@ -0,0 +1,158 @@
package endpoint
import (
"context"
"os"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/taskmonitor"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
var _ adapter.EndpointManager = (*Manager)(nil)
type Manager struct {
logger log.ContextLogger
registry adapter.EndpointRegistry
access sync.Mutex
started bool
stage adapter.StartStage
endpoints []adapter.Endpoint
endpointByTag map[string]adapter.Endpoint
}
func NewManager(logger log.ContextLogger, registry adapter.EndpointRegistry) *Manager {
return &Manager{
logger: logger,
registry: registry,
endpointByTag: make(map[string]adapter.Endpoint),
}
}
func (m *Manager) Start(stage adapter.StartStage) error {
m.access.Lock()
if m.started && m.stage >= stage {
panic("already started")
}
m.started = true
m.stage = stage
if stage == adapter.StartStateStart {
// started with outbound manager
m.access.Unlock()
return nil
}
endpoints := m.endpoints
m.access.Unlock()
for _, endpoint := range endpoints {
name := "endpoint/" + endpoint.Type() + "[" + endpoint.Tag() + "]"
done := adapter.LogElapsed(m.logger, stage, " ", name)
err := adapter.LegacyStart(endpoint, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
return nil
}
func (m *Manager) Close() error {
m.access.Lock()
defer m.access.Unlock()
if !m.started {
return nil
}
m.started = false
endpoints := m.endpoints
m.endpoints = nil
monitor := taskmonitor.New(m.logger, C.StopTimeout)
var err error
for _, endpoint := range endpoints {
name := "endpoint/" + endpoint.Type() + "[" + endpoint.Tag() + "]"
done := adapter.LogElapsed(m.logger, "close ", name)
monitor.Start("close ", name)
err = E.Append(err, endpoint.Close(), func(err error) error {
return E.Cause(err, "close ", name)
})
monitor.Finish()
done()
}
return nil
}
func (m *Manager) Endpoints() []adapter.Endpoint {
m.access.Lock()
defer m.access.Unlock()
return m.endpoints
}
func (m *Manager) Get(tag string) (adapter.Endpoint, bool) {
m.access.Lock()
defer m.access.Unlock()
endpoint, found := m.endpointByTag[tag]
return endpoint, found
}
func (m *Manager) Remove(tag string) error {
m.access.Lock()
endpoint, found := m.endpointByTag[tag]
if !found {
m.access.Unlock()
return os.ErrInvalid
}
delete(m.endpointByTag, tag)
index := common.Index(m.endpoints, func(it adapter.Endpoint) bool {
return it == endpoint
})
if index == -1 {
panic("invalid endpoint index")
}
m.endpoints = append(m.endpoints[:index], m.endpoints[index+1:]...)
started := m.started
m.access.Unlock()
if started {
return endpoint.Close()
}
return nil
}
func (m *Manager) Create(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) error {
endpoint, err := m.registry.Create(ctx, router, logger, tag, outboundType, options)
if err != nil {
return err
}
m.access.Lock()
defer m.access.Unlock()
if m.started {
name := "endpoint/" + endpoint.Type() + "[" + endpoint.Tag() + "]"
for _, stage := range adapter.ListStartStages {
done := adapter.LogElapsed(m.logger, stage, " ", name)
err = adapter.LegacyStart(endpoint, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
}
if existsEndpoint, loaded := m.endpointByTag[tag]; loaded {
if m.started {
err = existsEndpoint.Close()
if err != nil {
return E.Cause(err, "close endpoint/", existsEndpoint.Type(), "[", existsEndpoint.Tag(), "]")
}
}
existsIndex := common.Index(m.endpoints, func(it adapter.Endpoint) bool {
return it == existsEndpoint
})
if existsIndex == -1 {
panic("invalid endpoint index")
}
m.endpoints = append(m.endpoints[:existsIndex], m.endpoints[existsIndex+1:]...)
}
m.endpoints = append(m.endpoints, endpoint)
m.endpointByTag[tag] = endpoint
return nil
}
+80
View File
@@ -0,0 +1,80 @@
package endpoint
import (
"context"
"maps"
"slices"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
type ConstructorFunc[T any] func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options T) (adapter.Endpoint, error)
func Register[Options any](registry *Registry, outboundType string, constructor ConstructorFunc[Options]) {
registry.register(outboundType, func() any {
return new(Options)
}, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, rawOptions any) (adapter.Endpoint, error) {
var options *Options
if rawOptions != nil {
options = rawOptions.(*Options)
}
return constructor(ctx, router, logger, tag, common.PtrValueOrDefault(options))
})
}
var _ adapter.EndpointRegistry = (*Registry)(nil)
type (
optionsConstructorFunc func() any
constructorFunc func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options any) (adapter.Endpoint, error)
)
type Registry struct {
access sync.Mutex
optionsType map[string]optionsConstructorFunc
constructor map[string]constructorFunc
}
func NewRegistry() *Registry {
return &Registry{
optionsType: make(map[string]optionsConstructorFunc),
constructor: make(map[string]constructorFunc),
}
}
func (m *Registry) OptionTypes() []string {
m.access.Lock()
defer m.access.Unlock()
return slices.Sorted(maps.Keys(m.optionsType))
}
func (m *Registry) CreateOptions(outboundType string) (any, bool) {
m.access.Lock()
defer m.access.Unlock()
optionsConstructor, loaded := m.optionsType[outboundType]
if !loaded {
return nil, false
}
return optionsConstructor(), true
}
func (m *Registry) Create(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Endpoint, error) {
m.access.Lock()
defer m.access.Unlock()
constructor, loaded := m.constructor[outboundType]
if !loaded {
return nil, E.New("outbound type not found: " + outboundType)
}
return constructor(ctx, router, logger, tag, options)
}
func (m *Registry) register(outboundType string, optionsConstructor optionsConstructorFunc, constructor constructorFunc) {
m.access.Lock()
defer m.access.Unlock()
m.optionsType[outboundType] = optionsConstructor
m.constructor[outboundType] = constructor
}
+160 -14
View File
@@ -1,34 +1,180 @@
package adapter
import (
"bytes"
"context"
"net"
"encoding/binary"
"io"
"time"
N "github.com/sagernet/sing/common/network"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/observable"
"github.com/sagernet/sing/common/varbin"
)
type ClashServer interface {
Service
TrafficController
LifecycleService
Mode() string
ModeList() []string
SetMode(mode string)
AddModeUpdateHook(hook *observable.Subscriber[struct{}])
}
type Tracker interface {
Leave()
type URLTestHistory struct {
Time time.Time `json:"time"`
Delay uint16 `json:"delay"`
}
type TrafficController interface {
RoutedConnection(ctx context.Context, conn net.Conn, metadata InboundContext, matchedRule Rule) (net.Conn, Tracker)
RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext, matchedRule Rule) (N.PacketConn, Tracker)
type V2RayServer interface {
LifecycleService
StatsService() ConnectionTracker
}
type CacheFile interface {
LifecycleService
CacheID() string
StoreFakeIP() bool
FakeIPStorage
StoreRDRC() bool
RDRCStore
StoreWARPConfig() bool
StoreMASQUEConfig() bool
StoreSubscriptions() bool
StoreDNS() bool
DNSCacheStore
SetDisableExpire(disableExpire bool)
SetOptimisticTimeout(timeout time.Duration)
LoadMode() string
StoreMode(mode string) error
LoadSelected(group string) string
StoreSelected(group string, selected string) error
LoadGroupExpand(group string) (isExpand bool, loaded bool)
StoreGroupExpand(group string, expand bool) error
LoadRuleSet(tag string) *SavedBinary
SaveRuleSet(tag string, set *SavedBinary) error
LoadWARPConfig(tag string) *SavedBinary
SaveWARPConfig(tag string, set *SavedBinary) error
LoadMASQUEConfig(tag string) *SavedBinary
SaveMASQUEConfig(tag string, set *SavedBinary) error
LoadSubscription(tag string) *SavedBinary
SaveSubscription(tag string, sub *SavedBinary) error
}
type SavedBinary struct {
Content []byte
LastUpdated time.Time
LastEtag string
URLHash []byte
}
func (s *SavedBinary) MarshalBinary() ([]byte, error) {
var buffer bytes.Buffer
err := binary.Write(&buffer, binary.BigEndian, uint8(2))
if err != nil {
return nil, err
}
_, err = varbin.WriteUvarint(&buffer, uint64(len(s.Content)))
if err != nil {
return nil, err
}
_, err = buffer.Write(s.Content)
if err != nil {
return nil, err
}
err = binary.Write(&buffer, binary.BigEndian, s.LastUpdated.Unix())
if err != nil {
return nil, err
}
_, err = varbin.WriteUvarint(&buffer, uint64(len(s.LastEtag)))
if err != nil {
return nil, err
}
_, err = buffer.WriteString(s.LastEtag)
if err != nil {
return nil, err
}
_, err = varbin.WriteUvarint(&buffer, uint64(len(s.URLHash)))
if err != nil {
return nil, err
}
_, err = buffer.Write(s.URLHash)
if err != nil {
return nil, err
}
return buffer.Bytes(), nil
}
func (s *SavedBinary) UnmarshalBinary(data []byte) error {
reader := bytes.NewReader(data)
var version uint8
err := binary.Read(reader, binary.BigEndian, &version)
if err != nil {
return err
}
contentLength, err := binary.ReadUvarint(reader)
if err != nil {
return err
}
if contentLength > uint64(reader.Len()) {
return E.New("invalid content length: ", contentLength)
}
s.Content = make([]byte, contentLength)
_, err = io.ReadFull(reader, s.Content)
if err != nil {
return err
}
var lastUpdated int64
err = binary.Read(reader, binary.BigEndian, &lastUpdated)
if err != nil {
return err
}
s.LastUpdated = time.Unix(lastUpdated, 0)
etagLength, err := binary.ReadUvarint(reader)
if err != nil {
return err
}
if etagLength > uint64(reader.Len()) {
return E.New("invalid etag length: ", etagLength)
}
etagBytes := make([]byte, etagLength)
_, err = io.ReadFull(reader, etagBytes)
if err != nil {
return err
}
s.LastEtag = string(etagBytes)
if version < 2 {
return nil
}
urlHashLength, err := binary.ReadUvarint(reader)
if err != nil {
return err
}
if urlHashLength > uint64(reader.Len()) {
return E.New("invalid url hash length: ", urlHashLength)
}
s.URLHash = make([]byte, urlHashLength)
_, err = io.ReadFull(reader, s.URLHash)
if err != nil {
return err
}
return nil
}
type OutboundGroup interface {
Outbound
Now() string
All() []string
}
func OutboundTag(detour Outbound) string {
if group, isGroup := detour.(OutboundGroup); isGroup {
return group.Now()
}
return detour.Tag()
type URLTestGroup interface {
OutboundGroup
URLTest(ctx context.Context) (map[string]uint16, error)
PerformUpdateCheck()
}
+31
View File
@@ -0,0 +1,31 @@
package adapter
import (
"net/netip"
"github.com/sagernet/sing/common/logger"
)
type FakeIPStore interface {
SimpleLifecycle
Contains(address netip.Addr) bool
Create(domain string, isIPv6 bool) (netip.Addr, error)
Lookup(address netip.Addr) (string, bool)
Reset() error
}
type FakeIPStorage interface {
FakeIPMetadata() *FakeIPMetadata
FakeIPSaveMetadata(metadata *FakeIPMetadata) error
FakeIPSaveMetadataAsync(metadata *FakeIPMetadata)
FakeIPStore(address netip.Addr, domain string) error
FakeIPStoreAsync(address netip.Addr, domain string, logger logger.Logger)
FakeIPLoad(address netip.Addr) (string, bool)
FakeIPLoadDomain(domain string, isIPv6 bool) (netip.Addr, bool)
FakeIPReset() error
}
type FakeIPTransport interface {
DNSTransport
Store() FakeIPStore
}
+50
View File
@@ -0,0 +1,50 @@
package adapter
import (
"bytes"
"encoding"
"encoding/binary"
"io"
"net/netip"
"github.com/sagernet/sing/common"
)
type FakeIPMetadata struct {
Inet4Range netip.Prefix
Inet6Range netip.Prefix
Inet4Current netip.Addr
Inet6Current netip.Addr
}
func (m *FakeIPMetadata) MarshalBinary() (data []byte, err error) {
var buffer bytes.Buffer
for _, marshaler := range []encoding.BinaryMarshaler{m.Inet4Range, m.Inet6Range, m.Inet4Current, m.Inet6Current} {
data, err = marshaler.MarshalBinary()
if err != nil {
return
}
common.Must(binary.Write(&buffer, binary.BigEndian, uint16(len(data))))
buffer.Write(data)
}
data = buffer.Bytes()
return
}
func (m *FakeIPMetadata) UnmarshalBinary(data []byte) error {
reader := bytes.NewReader(data)
for _, unmarshaler := range []encoding.BinaryUnmarshaler{&m.Inet4Range, &m.Inet6Range, &m.Inet4Current, &m.Inet6Current} {
var length uint16
common.Must(binary.Read(reader, binary.BigEndian, &length))
element := make([]byte, length)
_, err := io.ReadFull(reader, element)
if err != nil {
return err
}
err = unmarshaler.UnmarshalBinary(element)
if err != nil {
return err
}
}
return nil
}
+11 -8
View File
@@ -5,28 +5,31 @@ import (
"net"
"github.com/sagernet/sing/common/buf"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
type ConnectionHandler interface {
NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
}
type PacketHandler interface {
NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, metadata InboundContext) error
NewPacket(buffer *buf.Buffer, source M.Socksaddr)
}
type PacketBatchHandler interface {
NewPacketBatch(buffers []*buf.Buffer, sources []M.Socksaddr)
}
type OOBPacketHandler interface {
NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, oob []byte, metadata InboundContext) error
NewPacket(buffer *buf.Buffer, oob []byte, source M.Socksaddr)
}
type PacketConnectionHandler interface {
NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
}
type UpstreamHandlerAdapter interface {
N.TCPConnectionHandler
N.UDPConnectionHandler
E.Handler
N.TCPConnectionHandlerEx
N.UDPConnectionHandlerEx
}
+43
View File
@@ -0,0 +1,43 @@
package adapter
import (
"context"
"net/http"
"sync"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/logger"
)
type HTTPTransport interface {
http.RoundTripper
CloseIdleConnections()
Reset()
}
type HTTPClientManager interface {
ResolveTransport(ctx context.Context, logger logger.ContextLogger, options option.HTTPClientOptions) (HTTPTransport, error)
DefaultTransport() HTTPTransport
ResetNetwork()
}
type HTTPStartContext struct {
access sync.Mutex
transports []HTTPTransport
}
func NewHTTPStartContext() *HTTPStartContext {
return &HTTPStartContext{}
}
func (c *HTTPStartContext) Register(transport HTTPTransport) {
c.access.Lock()
defer c.access.Unlock()
c.transports = append(c.transports, transport)
}
func (c *HTTPStartContext) Close() {
for _, transport := range c.transports {
transport.CloseIdleConnections()
}
}
+177 -20
View File
@@ -2,45 +2,195 @@ package adapter
import (
"context"
"net"
"net/netip"
"time"
"github.com/sagernet/sing-box/common/process"
"github.com/sagernet/sing-dns"
"github.com/sagernet/sing-box/common/tlsspoof"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
M "github.com/sagernet/sing/common/metadata"
"github.com/miekg/dns"
)
type Inbound interface {
Service
Lifecycle
Type() string
Tag() string
}
type TCPInjectableInbound interface {
Inbound
ConnectionHandler
}
type UDPInjectableInbound interface {
Inbound
PacketConnectionHandler
}
type InboundRegistry interface {
option.InboundOptionsRegistry
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, inboundType string, options any) (Inbound, error)
UnsafeCreate(ctx context.Context, router Router, logger log.ContextLogger, tag string, inboundType string, options any) (Inbound, error)
}
type InboundManager interface {
Lifecycle
Inbounds() []Inbound
Get(tag string) (Inbound, bool)
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, inboundType string, options any) error
}
type InboundContext struct {
Inbound string
InboundType string
IPVersion int
IPVersion uint8
Network string
Source M.Socksaddr
Destination M.Socksaddr
Domain string
Protocol string
Gateway *netip.Addr
User string
Outbound string
// power report
RouteRule string
RouteOutbound string
// sniffer
Protocol string
Domain string
Client string
SniffContext any
SnifferNames []string
SniffError error
// cache
OriginDestination M.Socksaddr
DomainStrategy dns.DomainStrategy
SniffEnabled bool
SniffOverrideDestination bool
DestinationAddresses []netip.Addr
SourceGeoIPCode string
GeoIPCode string
ProcessInfo *process.Info
// Deprecated: implement in rule action
InboundDetour string
LastInbound string
OriginDestination M.Socksaddr
RouteOriginalDestination M.Socksaddr
UDPDisableDomainUnmapping bool
UDPConnect bool
UDPTimeout time.Duration
TLSFragment bool
TLSFragmentFallbackDelay time.Duration
TLSRecordFragment bool
TLSSpoof string
TLSSpoofMethod tlsspoof.Method
NetworkStrategy *C.NetworkStrategy
NetworkType []C.InterfaceType
FallbackNetworkType []C.InterfaceType
FallbackDelay time.Duration
DestinationAddresses []netip.Addr
DNSResponse *dns.Msg
NamedDNSResponses map[string]*dns.Msg
DestinationAddressMatchFromResponse bool
SourceGeoIPCode string
GeoIPCode string
ProcessInfo *ConnectionOwner
SourceMACAddress net.HardwareAddr
SourceHostname string
QueryType uint16
QueryClientSubnet netip.Prefix
QueryDNSSEC bool
FakeIP bool
PreMatch bool
// rule cache
IPCIDRMatchSource bool
IPCIDRAcceptEmpty bool
SourceAddressMatch bool
SourcePortMatch bool
DestinationAddressMatch bool
DestinationPortMatch bool
DeferredIPCIDRMatchGroups uint8
IgnoreDestinationIPCIDRMatch bool
}
func (c *InboundContext) ResetRuleCache() {
c.IPCIDRMatchSource = false
c.IPCIDRAcceptEmpty = false
c.ResetRuleMatchCache()
}
func (c *InboundContext) ResetRuleMatchCache() {
c.SourceAddressMatch = false
c.SourcePortMatch = false
c.DestinationAddressMatch = false
c.DestinationPortMatch = false
c.DeferredIPCIDRMatchGroups = 0
}
func (c *InboundContext) DNSResponseAddressesForMatch() []netip.Addr {
return DNSResponseAddresses(c.DNSResponse)
}
func DNSResponseAddresses(response *dns.Msg) []netip.Addr {
if response == nil || response.Rcode != dns.RcodeSuccess {
return nil
}
addresses := make([]netip.Addr, 0, len(response.Answer))
for _, rawRecord := range response.Answer {
switch record := rawRecord.(type) {
case *dns.A:
addr := M.AddrFromIP(record.A)
if addr.IsValid() {
addresses = append(addresses, addr)
}
case *dns.AAAA:
addr := M.AddrFromIP(record.AAAA)
if addr.IsValid() {
addresses = append(addresses, addr)
}
case *dns.HTTPS:
for _, value := range record.SVCB.Value {
switch hint := value.(type) {
case *dns.SVCBIPv4Hint:
for _, ip := range hint.Hint {
addr := M.AddrFromIP(ip).Unmap()
if addr.IsValid() {
addresses = append(addresses, addr)
}
}
case *dns.SVCBIPv6Hint:
for _, ip := range hint.Hint {
addr := M.AddrFromIP(ip)
if addr.IsValid() {
addresses = append(addresses, addr)
}
}
}
}
}
}
return addresses
}
type inboundContextKey struct{}
type dnsTransportTagKey struct{}
func ContextWithDNSTransportTag(ctx context.Context, transportTag string) context.Context {
return context.WithValue(ctx, (*dnsTransportTagKey)(nil), transportTag)
}
func DNSTransportTagFromContext(ctx context.Context) (string, bool) {
transportTag, loaded := ctx.Value((*dnsTransportTagKey)(nil)).(string)
return transportTag, loaded
}
func WithContext(ctx context.Context, inboundContext *InboundContext) context.Context {
return context.WithValue(ctx, (*inboundContextKey)(nil), inboundContext)
}
@@ -53,11 +203,18 @@ func ContextFrom(ctx context.Context) *InboundContext {
return metadata.(*InboundContext)
}
func AppendContext(ctx context.Context) (context.Context, *InboundContext) {
metadata := ContextFrom(ctx)
if metadata != nil {
return ctx, metadata
func ExtendContext(ctx context.Context) (context.Context, *InboundContext) {
var newMetadata InboundContext
if metadata := ContextFrom(ctx); metadata != nil {
newMetadata = *metadata
}
metadata = new(InboundContext)
return WithContext(ctx, metadata), metadata
return WithContext(ctx, &newMetadata), &newMetadata
}
func OverrideContext(ctx context.Context) context.Context {
if metadata := ContextFrom(ctx); metadata != nil {
newMetadata := *metadata
return WithContext(ctx, &newMetadata)
}
return ctx
}
+21
View File
@@ -0,0 +1,21 @@
package inbound
type Adapter struct {
inboundType string
inboundTag string
}
func NewAdapter(inboundType string, inboundTag string) Adapter {
return Adapter{
inboundType: inboundType,
inboundTag: inboundTag,
}
}
func (a *Adapter) Type() string {
return a.inboundType
}
func (a *Adapter) Tag() string {
return a.inboundTag
}
+158
View File
@@ -0,0 +1,158 @@
package inbound
import (
"context"
"os"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/taskmonitor"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
var _ adapter.InboundManager = (*Manager)(nil)
type Manager struct {
logger log.ContextLogger
registry adapter.InboundRegistry
endpoint adapter.EndpointManager
access sync.Mutex
started bool
stage adapter.StartStage
inbounds []adapter.Inbound
inboundByTag map[string]adapter.Inbound
}
func NewManager(logger log.ContextLogger, registry adapter.InboundRegistry, endpoint adapter.EndpointManager) *Manager {
return &Manager{
logger: logger,
registry: registry,
endpoint: endpoint,
inboundByTag: make(map[string]adapter.Inbound),
}
}
func (m *Manager) Start(stage adapter.StartStage) error {
m.access.Lock()
if m.started && m.stage >= stage {
panic("already started")
}
m.started = true
m.stage = stage
inbounds := m.inbounds
m.access.Unlock()
for _, inbound := range inbounds {
name := "inbound/" + inbound.Type() + "[" + inbound.Tag() + "]"
done := adapter.LogElapsed(m.logger, stage, " ", name)
err := adapter.LegacyStart(inbound, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
return nil
}
func (m *Manager) Close() error {
m.access.Lock()
defer m.access.Unlock()
if !m.started {
return nil
}
m.started = false
inbounds := m.inbounds
m.inbounds = nil
monitor := taskmonitor.New(m.logger, C.StopTimeout)
var err error
for _, inbound := range inbounds {
name := "inbound/" + inbound.Type() + "[" + inbound.Tag() + "]"
done := adapter.LogElapsed(m.logger, "close ", name)
monitor.Start("close ", name)
err = E.Append(err, inbound.Close(), func(err error) error {
return E.Cause(err, "close ", name)
})
monitor.Finish()
done()
}
return nil
}
func (m *Manager) Inbounds() []adapter.Inbound {
m.access.Lock()
defer m.access.Unlock()
return m.inbounds
}
func (m *Manager) Get(tag string) (adapter.Inbound, bool) {
m.access.Lock()
inbound, found := m.inboundByTag[tag]
m.access.Unlock()
if found {
return inbound, true
}
return m.endpoint.Get(tag)
}
func (m *Manager) Remove(tag string) error {
m.access.Lock()
inbound, found := m.inboundByTag[tag]
if !found {
m.access.Unlock()
return os.ErrInvalid
}
delete(m.inboundByTag, tag)
index := common.Index(m.inbounds, func(it adapter.Inbound) bool {
return it == inbound
})
if index == -1 {
panic("invalid inbound index")
}
m.inbounds = append(m.inbounds[:index], m.inbounds[index+1:]...)
started := m.started
m.access.Unlock()
if started {
return inbound.Close()
}
return nil
}
func (m *Manager) Create(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) error {
inbound, err := m.registry.Create(ctx, router, logger, tag, outboundType, options)
if err != nil {
return err
}
m.access.Lock()
defer m.access.Unlock()
if m.started {
name := "inbound/" + inbound.Type() + "[" + inbound.Tag() + "]"
for _, stage := range adapter.ListStartStages {
done := adapter.LogElapsed(m.logger, stage, " ", name)
err = adapter.LegacyStart(inbound, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
}
if existsInbound, loaded := m.inboundByTag[tag]; loaded {
if m.started {
err = existsInbound.Close()
if err != nil {
return E.Cause(err, "close inbound/", existsInbound.Type(), "[", existsInbound.Tag(), "]")
}
}
existsIndex := common.Index(m.inbounds, func(it adapter.Inbound) bool {
return it == existsInbound
})
if existsIndex == -1 {
panic("invalid inbound index")
}
m.inbounds = append(m.inbounds[:existsIndex], m.inbounds[existsIndex+1:]...)
}
m.inbounds = append(m.inbounds, inbound)
m.inboundByTag[tag] = inbound
return nil
}
+84
View File
@@ -0,0 +1,84 @@
package inbound
import (
"context"
"maps"
"slices"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
type ConstructorFunc[T any] func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options T) (adapter.Inbound, error)
func Register[Options any](registry *Registry, outboundType string, constructor ConstructorFunc[Options]) {
registry.register(outboundType, func() any {
return new(Options)
}, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, rawOptions any) (adapter.Inbound, error) {
var options *Options
if rawOptions != nil {
options = rawOptions.(*Options)
}
return constructor(ctx, router, logger, tag, common.PtrValueOrDefault(options))
})
}
var _ adapter.InboundRegistry = (*Registry)(nil)
type (
optionsConstructorFunc func() any
constructorFunc func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options any) (adapter.Inbound, error)
)
type Registry struct {
access sync.Mutex
optionsType map[string]optionsConstructorFunc
constructor map[string]constructorFunc
}
func NewRegistry() *Registry {
return &Registry{
optionsType: make(map[string]optionsConstructorFunc),
constructor: make(map[string]constructorFunc),
}
}
func (m *Registry) OptionTypes() []string {
m.access.Lock()
defer m.access.Unlock()
return slices.Sorted(maps.Keys(m.optionsType))
}
func (m *Registry) CreateOptions(outboundType string) (any, bool) {
m.access.Lock()
defer m.access.Unlock()
optionsConstructor, loaded := m.optionsType[outboundType]
if !loaded {
return nil, false
}
return optionsConstructor(), true
}
func (m *Registry) Create(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Inbound, error) {
m.access.Lock()
defer m.access.Unlock()
return m.UnsafeCreate(ctx, router, logger, tag, outboundType, options)
}
func (m *Registry) UnsafeCreate(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Inbound, error) {
constructor, loaded := m.constructor[outboundType]
if !loaded {
return nil, E.New("outbound type not found: " + outboundType)
}
return constructor(ctx, router, logger, tag, options)
}
func (m *Registry) register(outboundType string, optionsConstructor optionsConstructorFunc, constructor constructorFunc) {
m.access.Lock()
defer m.access.Unlock()
m.optionsType[outboundType] = optionsConstructor
m.constructor[outboundType] = constructor
}
+45
View File
@@ -0,0 +1,45 @@
package adapter
import (
"net"
"net/netip"
"testing"
"github.com/miekg/dns"
"github.com/stretchr/testify/require"
)
func TestDNSResponseAddressesUnmapsHTTPSIPv4Hints(t *testing.T) {
t.Parallel()
ipv4Hint := net.ParseIP("1.1.1.1")
require.NotNil(t, ipv4Hint)
response := &dns.Msg{
MsgHdr: dns.MsgHdr{
Response: true,
Rcode: dns.RcodeSuccess,
},
Answer: []dns.RR{
&dns.HTTPS{
SVCB: dns.SVCB{
Hdr: dns.RR_Header{
Name: dns.Fqdn("example.com"),
Rrtype: dns.TypeHTTPS,
Class: dns.ClassINET,
Ttl: 60,
},
Priority: 1,
Target: ".",
Value: []dns.SVCBKeyValue{
&dns.SVCBIPv4Hint{Hint: []net.IP{ipv4Hint}},
},
},
},
},
}
addresses := DNSResponseAddresses(response)
require.Equal(t, []netip.Addr{netip.MustParseAddr("1.1.1.1")}, addresses)
require.True(t, addresses[0].Is4())
}
+123
View File
@@ -0,0 +1,123 @@
package adapter
import (
"context"
"reflect"
"strings"
"time"
"github.com/sagernet/sing-box/log"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
)
type SimpleLifecycle interface {
Start() error
Close() error
}
type StartStage uint8
const (
StartStateInitialize StartStage = iota
StartStateStart
StartStatePostStart
StartStateStarted
)
var ListStartStages = []StartStage{
StartStateInitialize,
StartStateStart,
StartStatePostStart,
StartStateStarted,
}
func (s StartStage) String() string {
switch s {
case StartStateInitialize:
return "initialize"
case StartStateStart:
return "start"
case StartStatePostStart:
return "post-start"
case StartStateStarted:
return "finish-start"
default:
panic("unknown stage")
}
}
type Lifecycle interface {
Start(stage StartStage) error
Close() error
}
type LifecycleService interface {
Name() string
Lifecycle
}
func getServiceName(service any) string {
if named, ok := service.(interface {
Type() string
Tag() string
}); ok {
tag := named.Tag()
if tag != "" {
return named.Type() + "[" + tag + "]"
}
return named.Type()
}
t := reflect.TypeOf(service)
if t.Kind() == reflect.Ptr {
t = t.Elem()
}
return strings.ToLower(t.Name())
}
func Start(ctx context.Context, logger log.ContextLogger, stage StartStage, services ...Lifecycle) error {
for _, service := range services {
err := ctx.Err()
if err != nil {
return err
}
name := getServiceName(service)
done := LogElapsed(logger, stage, " ", name)
err = service.Start(stage)
done()
if err != nil {
return err
}
}
return nil
}
func StartNamed(ctx context.Context, logger log.ContextLogger, stage StartStage, services []LifecycleService) error {
for _, service := range services {
err := ctx.Err()
if err != nil {
return err
}
done := LogElapsed(logger, stage, " ", service.Name())
err = service.Start(stage)
done()
if err != nil {
return E.Cause(err, stage.String(), " ", service.Name())
}
}
return nil
}
func LogElapsed(logger log.ContextLogger, description ...any) func() {
prefix := F.ToString(description...)
startTime := time.Now()
timer := time.AfterFunc(time.Second, func() {
logger.Trace(prefix, "...")
})
return func() {
if timer.Stop() {
return
}
logger.Trace(prefix, " completed (", F.Seconds(time.Since(startTime).Seconds()), "s)")
}
}
+52
View File
@@ -0,0 +1,52 @@
package adapter
func LegacyStart(starter any, stage StartStage) error {
if lifecycle, isLifecycle := starter.(Lifecycle); isLifecycle {
return lifecycle.Start(stage)
}
switch stage {
case StartStateInitialize:
if preStarter, isPreStarter := starter.(interface {
PreStart() error
}); isPreStarter {
return preStarter.PreStart()
}
case StartStateStart:
if starter, isStarter := starter.(interface {
Start() error
}); isStarter {
return starter.Start()
}
case StartStateStarted:
if postStarter, isPostStarter := starter.(interface {
PostStart() error
}); isPostStarter {
return postStarter.PostStart()
}
}
return nil
}
type lifecycleServiceWrapper struct {
SimpleLifecycle
name string
}
func NewLifecycleService(service SimpleLifecycle, name string) LifecycleService {
return &lifecycleServiceWrapper{
SimpleLifecycle: service,
name: name,
}
}
func (l *lifecycleServiceWrapper) Name() string {
return l.name
}
func (l *lifecycleServiceWrapper) Start(stage StartStage) error {
return LegacyStart(l.SimpleLifecycle, stage)
}
func (l *lifecycleServiceWrapper) Close() error {
return l.SimpleLifecycle.Close()
}
+24
View File
@@ -0,0 +1,24 @@
package adapter
import (
"net"
"net/netip"
)
type NeighborEntry struct {
Address netip.Addr
MACAddress net.HardwareAddr
Hostname string
}
type NeighborResolver interface {
LookupMAC(address netip.Addr) (net.HardwareAddr, bool)
LookupHostname(address netip.Addr) (string, bool)
LookupAddresses(hostname string) []netip.Addr
Start() error
Close() error
}
type NeighborUpdateListener interface {
UpdateNeighborTable(entries []NeighborEntry)
}
+5
View File
@@ -0,0 +1,5 @@
package adapter
type NetworkNamespaceManager interface {
ResolvePath(nameOrPath string) string
}
+85
View File
@@ -0,0 +1,85 @@
package adapter
import (
"context"
"encoding/hex"
"net"
"net/netip"
"strings"
"time"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-tun"
"github.com/sagernet/sing/common/control"
)
type NetworkManager interface {
Lifecycle
Initialize(ruleSets []RuleSet)
InterfaceFinder() control.InterfaceFinder
UpdateInterfaces() error
DefaultNetworkInterface() *NetworkInterface
NetworkInterfaces() []NetworkInterface
NetworkEnvironment() uint64
AutoDetectInterface() bool
AutoDetectInterfaceFunc() control.Func
ProtectFunc() control.Func
DefaultOptions() NetworkOptions
RegisterAutoRedirectOutputMark(mark uint32) error
AutoRedirectOutputMark() uint32
AutoRedirectOutputMarkFunc() control.Func
NetworkMonitor() tun.NetworkUpdateMonitor
InterfaceMonitor() tun.DefaultInterfaceMonitor
PackageManager() tun.PackageManager
NeedWIFIState() bool
WIFIState() WIFIState
UpdateWIFIState(ctx context.Context)
ResetNetwork(ctx context.Context)
}
type NetworkOptions struct {
BindInterface string
RoutingMark uint32
DomainResolver string
DomainResolveOptions DNSQueryOptions
NetworkStrategy *C.NetworkStrategy
NetworkType []C.InterfaceType
FallbackNetworkType []C.InterfaceType
FallbackDelay time.Duration
}
type InterfaceUpdateListener interface {
InterfaceUpdated(ctx context.Context)
}
type WIFIState struct {
SSID string
BSSID string
}
func NormalizeWIFIBSSID(bssid string) string {
bssid = strings.TrimSpace(bssid)
if bssid == "" {
return ""
}
parsed, err := net.ParseMAC(bssid)
if err == nil && len(parsed) == 6 {
return parsed.String()
}
if len(bssid) == 12 {
decoded, err := hex.DecodeString(bssid)
if err == nil {
return net.HardwareAddr(decoded).String()
}
}
return bssid
}
type NetworkInterface struct {
control.Interface
Type C.InterfaceType
DNSServers []string
Gateways []netip.Addr
Expensive bool
Constrained bool
}
+101
View File
@@ -0,0 +1,101 @@
package adapter
import (
"net/netip"
"time"
)
const (
OpenConnectStateConnecting = "connecting"
OpenConnectStateAuthPending = "auth-pending"
OpenConnectStateConnected = "connected"
OpenConnectStateError = "error"
)
type OpenConnectEndpoint interface {
Endpoint
OpenConnectStatus() OpenConnectStatus
StatusUpdated() <-chan struct{}
CompleteAuthChallenge(challengeID string, response OpenConnectAuthResponse) error
CancelAuthChallenge(challengeID string) error
}
type OpenConnectStatus struct {
State string
AuthChallenge *OpenConnectAuthChallenge
Error string
TunnelInfo *OpenConnectTunnelInfo
}
type OpenConnectTunnelInfo struct {
Server string
Flavor string
Transport string
IPv4 []netip.Prefix
IPv6 []netip.Prefix
DNS []netip.Addr
MTU uint32
ConnectedSince time.Time
}
type OpenConnectAuthChallenge struct {
ID string
Banner string
Message string
Error string
Form *OpenConnectAuthForm
Browser *OpenConnectBrowserRequest
}
type OpenConnectAuthForm struct {
Fields []OpenConnectAuthFormField
}
type OpenConnectBrowserRequest struct {
URL string
FinalURL string
CookieNames []string
EarlyCookieNames []string
HeaderNames []string
CallbackURLPrefixes []string
CacheID string
}
type OpenConnectBrowserCookie struct {
Name string
Value string
}
type OpenConnectBrowserHeader struct {
Name string
Values []string
}
type OpenConnectAuthResponse struct {
Form *OpenConnectAuthFormResponse
Browser *OpenConnectBrowserResult
}
type OpenConnectAuthFormResponse struct {
Values map[string]string
}
type OpenConnectBrowserResult struct {
FinalURL string
Cookies []OpenConnectBrowserCookie
Headers []OpenConnectBrowserHeader
}
type OpenConnectAuthFormField struct {
SubmissionKey string
Name string
Label string
Kind string
Value string
Options []OpenConnectAuthFormChoice
}
type OpenConnectAuthFormChoice struct {
Value string
Label string
}
+57
View File
@@ -0,0 +1,57 @@
package adapter
import (
"net/netip"
"time"
)
const (
OpenVPNStateConnecting = "connecting"
OpenVPNStateAuthPending = "auth-pending"
OpenVPNStateConnected = "connected"
OpenVPNStateError = "error"
)
type OpenVPNEndpoint interface {
Endpoint
OpenVPNStatus() OpenVPNStatus
StatusUpdated() <-chan struct{}
CompleteChallenge(challengeID string, response OpenVPNChallengeResponse) error
CancelChallenge(challengeID string) error
}
type OpenVPNStatus struct {
State string
Challenge *OpenVPNChallenge
Error string
TunnelInfo *OpenVPNTunnelInfo
}
type OpenVPNTunnelInfo struct {
Server string
Network string
Cipher string
IPv4 []netip.Prefix
IPv6 []netip.Prefix
DNS []netip.Addr
MTU uint32
ConnectedSince time.Time
}
type OpenVPNChallenge struct {
ID string
Kind string
Username string
Message string
URL string
SecretMessage string
Echo bool
PreviousError string
Deadline time.Time
}
type OpenVPNChallengeResponse struct {
Username string
Password string
Secret string
}
+37 -3
View File
@@ -2,8 +2,11 @@ package adapter
import (
"context"
"net"
"net/netip"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-tun"
N "github.com/sagernet/sing/common/network"
)
@@ -13,7 +16,38 @@ type Outbound interface {
Type() string
Tag() string
Network() []string
Dependencies() []string
N.Dialer
NewConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
}
type OutboundWithPreferredRoutes interface {
Outbound
PreferredDomain(metadata *InboundContext, domain string) bool
PreferredAddress(metadata *InboundContext, address netip.Addr) bool
}
type OutboundWithMultiplex interface {
Outbound
MultiplexEnabled() bool
}
type FlowOutbound interface {
Outbound
tun.Port
PreMatchFlow(network string, destination netip.Addr) PreMatchAction
}
type OutboundRegistry interface {
option.OutboundOptionsRegistry
CreateOutbound(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) (Outbound, error)
UnsafeCreateOutbound(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) (Outbound, error)
}
type OutboundManager interface {
Lifecycle
Outbounds() []Outbound
Outbound(tag string) (Outbound, bool)
Default() Outbound
Remove(tag string) error
Create(ctx context.Context, router Router, logger log.ContextLogger, tag string, outboundType string, options any) error
}
+45
View File
@@ -0,0 +1,45 @@
package outbound
import (
"github.com/sagernet/sing-box/option"
)
type Adapter struct {
outboundType string
outboundTag string
network []string
dependencies []string
}
func NewAdapter(outboundType string, outboundTag string, network []string, dependencies []string) Adapter {
return Adapter{
outboundType: outboundType,
outboundTag: outboundTag,
network: network,
dependencies: dependencies,
}
}
func NewAdapterWithDialerOptions(outboundType string, outboundTag string, network []string, dialOptions option.DialerOptions) Adapter {
var dependencies []string
if dialOptions.Detour != "" {
dependencies = []string{dialOptions.Detour}
}
return NewAdapter(outboundType, outboundTag, network, dependencies)
}
func (a *Adapter) Type() string {
return a.outboundType
}
func (a *Adapter) Tag() string {
return a.outboundTag
}
func (a *Adapter) Network() []string {
return a.network
}
func (a *Adapter) Dependencies() []string {
return a.dependencies
}
+310
View File
@@ -0,0 +1,310 @@
package outbound
import (
"context"
"io"
"os"
"strings"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/taskmonitor"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
)
var _ adapter.OutboundManager = (*Manager)(nil)
type Manager struct {
logger log.ContextLogger
registry adapter.OutboundRegistry
endpoint adapter.EndpointManager
defaultTag string
access sync.RWMutex
started bool
stage adapter.StartStage
outbounds []adapter.Outbound
outboundByTag map[string]adapter.Outbound
dependByTag map[string][]string
defaultOutbound adapter.Outbound
defaultOutboundFallback func() (adapter.Outbound, error)
}
func NewManager(logger logger.ContextLogger, registry adapter.OutboundRegistry, endpoint adapter.EndpointManager, defaultTag string) *Manager {
return &Manager{
logger: logger,
registry: registry,
endpoint: endpoint,
defaultTag: defaultTag,
outboundByTag: make(map[string]adapter.Outbound),
dependByTag: make(map[string][]string),
}
}
func (m *Manager) Initialize(defaultOutboundFallback func() (adapter.Outbound, error)) {
m.defaultOutboundFallback = defaultOutboundFallback
}
func (m *Manager) Start(stage adapter.StartStage) error {
m.access.Lock()
if m.started && m.stage >= stage {
panic("already started")
}
m.started = true
m.stage = stage
if stage == adapter.StartStateStart {
if m.defaultTag != "" && m.defaultOutbound == nil {
defaultEndpoint, loaded := m.endpoint.Get(m.defaultTag)
if !loaded {
m.access.Unlock()
return E.New("default outbound not found: ", m.defaultTag)
}
m.defaultOutbound = defaultEndpoint
}
if m.defaultOutbound == nil {
directOutbound, err := m.defaultOutboundFallback()
if err != nil {
m.access.Unlock()
return E.Cause(err, "create direct outbound for fallback")
}
m.outbounds = append(m.outbounds, directOutbound)
m.outboundByTag[directOutbound.Tag()] = directOutbound
m.defaultOutbound = directOutbound
}
outbounds := m.outbounds
m.access.Unlock()
return m.startOutbounds(append(outbounds, common.Map(m.endpoint.Endpoints(), func(it adapter.Endpoint) adapter.Outbound { return it })...))
} else {
outbounds := m.outbounds
m.access.Unlock()
for _, outbound := range outbounds {
name := "outbound/" + outbound.Type() + "[" + outbound.Tag() + "]"
done := adapter.LogElapsed(m.logger, stage, " ", name)
err := adapter.LegacyStart(outbound, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
}
return nil
}
func (m *Manager) startOutbounds(outbounds []adapter.Outbound) error {
monitor := taskmonitor.New(m.logger, C.StartTimeout)
started := make(map[string]bool)
for {
canContinue := false
startOne:
for _, outboundToStart := range outbounds {
outboundTag := outboundToStart.Tag()
if started[outboundTag] {
continue
}
dependencies := outboundToStart.Dependencies()
for _, dependency := range dependencies {
if !started[dependency] {
continue startOne
}
}
started[outboundTag] = true
canContinue = true
name := "outbound/" + outboundToStart.Type() + "[" + outboundTag + "]"
if starter, isStarter := outboundToStart.(adapter.Lifecycle); isStarter {
done := adapter.LogElapsed(m.logger, "start ", name)
monitor.Start("start ", name)
err := starter.Start(adapter.StartStateStart)
monitor.Finish()
done()
if err != nil {
return E.Cause(err, "start ", name)
}
} else if starter, isStarter := outboundToStart.(interface {
Start() error
}); isStarter {
done := adapter.LogElapsed(m.logger, "start ", name)
monitor.Start("start ", name)
err := starter.Start()
monitor.Finish()
done()
if err != nil {
return E.Cause(err, "start ", name)
}
}
}
if len(started) == len(outbounds) {
break
}
if canContinue {
continue
}
currentOutbound := common.Find(outbounds, func(it adapter.Outbound) bool {
return !started[it.Tag()]
})
var lintOutbound func(oTree []string, oCurrent adapter.Outbound) error
lintOutbound = func(oTree []string, oCurrent adapter.Outbound) error {
problemOutboundTag := common.Find(oCurrent.Dependencies(), func(it string) bool {
return !started[it]
})
if common.Contains(oTree, problemOutboundTag) {
return E.New("circular outbound dependency: ", strings.Join(oTree, " -> "), " -> ", problemOutboundTag)
}
m.access.Lock()
problemOutbound := m.outboundByTag[problemOutboundTag]
m.access.Unlock()
if problemOutbound == nil {
return E.New("dependency[", problemOutboundTag, "] not found for outbound[", oCurrent.Tag(), "]")
}
return lintOutbound(append(oTree, problemOutboundTag), problemOutbound)
}
return lintOutbound([]string{currentOutbound.Tag()}, currentOutbound)
}
return nil
}
func (m *Manager) Close() error {
monitor := taskmonitor.New(m.logger, C.StopTimeout)
m.access.Lock()
if !m.started {
m.access.Unlock()
return nil
}
m.started = false
outbounds := m.outbounds
m.outbounds = nil
m.access.Unlock()
var err error
for _, outbound := range outbounds {
if closer, isCloser := outbound.(io.Closer); isCloser {
name := "outbound/" + outbound.Type() + "[" + outbound.Tag() + "]"
done := adapter.LogElapsed(m.logger, "close ", name)
monitor.Start("close ", name)
err = E.Append(err, closer.Close(), func(err error) error {
return E.Cause(err, "close ", name)
})
monitor.Finish()
done()
}
}
return nil
}
func (m *Manager) Outbounds() []adapter.Outbound {
m.access.RLock()
defer m.access.RUnlock()
return m.outbounds
}
func (m *Manager) Outbound(tag string) (adapter.Outbound, bool) {
m.access.RLock()
outbound, found := m.outboundByTag[tag]
m.access.RUnlock()
if found {
return outbound, true
}
return m.endpoint.Get(tag)
}
func (m *Manager) Default() adapter.Outbound {
m.access.RLock()
defer m.access.RUnlock()
return m.defaultOutbound
}
func (m *Manager) Remove(tag string) error {
m.access.Lock()
defer m.access.Unlock()
outbound, found := m.outboundByTag[tag]
if !found {
return os.ErrInvalid
}
delete(m.outboundByTag, tag)
index := common.Index(m.outbounds, func(it adapter.Outbound) bool {
return it == outbound
})
if index == -1 {
panic("invalid inbound index")
}
m.outbounds = append(m.outbounds[:index], m.outbounds[index+1:]...)
started := m.started
if m.defaultOutbound == outbound {
if len(m.outbounds) > 0 {
m.defaultOutbound = m.outbounds[0]
m.logger.Notice("updated default outbound to ", m.defaultOutbound.Tag())
} else {
m.defaultOutbound = nil
}
}
dependBy := m.dependByTag[tag]
if len(dependBy) > 0 {
return E.New("outbound[", tag, "] is depended by ", strings.Join(dependBy, ", "))
}
dependencies := outbound.Dependencies()
for _, dependency := range dependencies {
if len(m.dependByTag[dependency]) == 1 {
delete(m.dependByTag, dependency)
} else {
m.dependByTag[dependency] = common.Filter(m.dependByTag[dependency], func(it string) bool {
return it != tag
})
}
}
if started {
return common.Close(outbound)
}
return nil
}
func (m *Manager) Create(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, inboundType string, options any) error {
if tag == "" {
return os.ErrInvalid
}
outbound, err := m.registry.CreateOutbound(ctx, router, logger, tag, inboundType, options)
if err != nil {
return err
}
if m.started {
name := "outbound/" + outbound.Type() + "[" + outbound.Tag() + "]"
for _, stage := range adapter.ListStartStages {
done := adapter.LogElapsed(m.logger, stage, " ", name)
err = adapter.LegacyStart(outbound, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
}
m.access.Lock()
defer m.access.Unlock()
if existsOutbound, loaded := m.outboundByTag[tag]; loaded {
if m.started {
err = common.Close(existsOutbound)
if err != nil {
return E.Cause(err, "close outbound/", existsOutbound.Type(), "[", existsOutbound.Tag(), "]")
}
}
existsIndex := common.Index(m.outbounds, func(it adapter.Outbound) bool {
return it == existsOutbound
})
if existsIndex == -1 {
panic("invalid inbound index")
}
m.outbounds = append(m.outbounds[:existsIndex], m.outbounds[existsIndex+1:]...)
}
m.outbounds = append(m.outbounds, outbound)
m.outboundByTag[tag] = outbound
dependencies := outbound.Dependencies()
for _, dependency := range dependencies {
m.dependByTag[dependency] = append(m.dependByTag[dependency], tag)
}
if tag == m.defaultTag || (m.defaultTag == "" && m.defaultOutbound == nil) {
m.defaultOutbound = outbound
if m.started {
m.logger.Notice("updated default outbound to ", outbound.Tag())
}
}
return nil
}
+84
View File
@@ -0,0 +1,84 @@
package outbound
import (
"context"
"maps"
"slices"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
type ConstructorFunc[T any] func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options T) (adapter.Outbound, error)
func Register[Options any](registry *Registry, outboundType string, constructor ConstructorFunc[Options]) {
registry.register(outboundType, func() any {
return new(Options)
}, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, rawOptions any) (adapter.Outbound, error) {
var options *Options
if rawOptions != nil {
options = rawOptions.(*Options)
}
return constructor(ctx, router, logger, tag, common.PtrValueOrDefault(options))
})
}
var _ adapter.OutboundRegistry = (*Registry)(nil)
type (
optionsConstructorFunc func() any
constructorFunc func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options any) (adapter.Outbound, error)
)
type Registry struct {
access sync.Mutex
optionsType map[string]optionsConstructorFunc
constructors map[string]constructorFunc
}
func NewRegistry() *Registry {
return &Registry{
optionsType: make(map[string]optionsConstructorFunc),
constructors: make(map[string]constructorFunc),
}
}
func (r *Registry) OptionTypes() []string {
r.access.Lock()
defer r.access.Unlock()
return slices.Sorted(maps.Keys(r.optionsType))
}
func (r *Registry) CreateOptions(outboundType string) (any, bool) {
r.access.Lock()
defer r.access.Unlock()
optionsConstructor, loaded := r.optionsType[outboundType]
if !loaded {
return nil, false
}
return optionsConstructor(), true
}
func (r *Registry) CreateOutbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Outbound, error) {
r.access.Lock()
defer r.access.Unlock()
return r.UnsafeCreateOutbound(ctx, router, logger, tag, outboundType, options)
}
func (r *Registry) UnsafeCreateOutbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Outbound, error) {
constructor, loaded := r.constructors[outboundType]
if !loaded {
return nil, E.New("outbound type not found: " + outboundType)
}
return constructor(ctx, router, logger, tag, options)
}
func (r *Registry) register(outboundType string, optionsConstructor optionsConstructorFunc, constructor constructorFunc) {
r.access.Lock()
defer r.access.Unlock()
r.optionsType[outboundType] = optionsConstructor
r.constructors[outboundType] = constructor
}
+119
View File
@@ -0,0 +1,119 @@
package adapter
import (
"context"
"net/netip"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-tun"
"github.com/sagernet/sing/common/logger"
)
type PlatformInterface interface {
Initialize(networkManager NetworkManager) error
UsePlatformAutoDetectInterfaceControl() bool
AutoDetectInterfaceControl(fd int) error
BindInterfaceControl(fd int, interfaceName string) error
UsePlatformInterface() bool
OpenInterface(options *tun.Options, platformOptions option.TunPlatformOptions) (tun.Tun, error)
ProcessPlatformOptions(options option.TunPlatformOptions) error
UsePlatformDefaultInterfaceMonitor() bool
CreateDefaultInterfaceMonitor(logger logger.Logger) tun.DefaultInterfaceMonitor
UsePlatformNetworkInterfaces() bool
NetworkInterfaces() ([]NetworkInterface, error)
UnderNetworkExtension() bool
NetworkExtensionIncludeAllNetworks() bool
ClearDNSCache()
RequestPermissionForWIFIState() error
ReadWIFIState(ctx context.Context) WIFIState
UsePlatformConnectionOwnerFinder() bool
FindConnectionOwner(request *FindConnectionOwnerRequest) (*ConnectionOwner, error)
UsePlatformWIFIMonitor() bool
UsePlatformNotification() bool
SendNotification(notification *Notification) error
CancelNotification(identifier string, typeID int32) error
MyInterfaceAddress() []netip.Addr
UsePlatformNeighborResolver() bool
StartNeighborMonitor(listener NeighborUpdateListener) error
CloseNeighborMonitor(listener NeighborUpdateListener) error
UsePlatformShell() bool
CheckPlatformShell() error
OpenShellSession(user *PlatformUser, command string, env []string, term string, rows int32, cols int32) (ShellSession, error)
LookupUser(username string) (*PlatformUser, error)
LookupSFTPServer() (string, error)
ReadSystemSSHHostKey() ([]byte, error)
TailscaleHostname() string
UsePlatformBridge() bool
CreateBridge(options BridgeOptions) (BridgeSession, error)
}
type BridgeOptions struct {
BridgeName string
MTU uint32
Inet4Port netip.Addr
Inet6Port netip.Addr
Interface string
RuleIndex int
RouteTable int
}
type BridgeSession interface {
FileDescriptor() int
Name() string
Inet6Active() bool
SetEgress(interfaceName string) error
Close() error
}
type PlatformUser struct {
Username string
Uid int
Gid int
HomeDir string
Shell string
Groups []int
}
type FindConnectionOwnerRequest struct {
IpProtocol int32
SourceAddress string
SourcePort int32
DestinationAddress string
DestinationPort int32
}
type ConnectionOwner struct {
ProcessID uint32
UserId int32
UserName string
ProcessPath string
AndroidPackageNames []string
}
type Notification struct {
Identifier string
TypeName string
TypeID int32
Title string
Subtitle string
Body string
OpenURL string
}
type SystemProxyStatus struct {
Available bool
Enabled bool
}
+1
View File
@@ -0,0 +1 @@
package adapter
+51
View File
@@ -0,0 +1,51 @@
package adapter
import (
"context"
"time"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/x/list"
)
type Provider interface {
Type() string
Tag() string
Outbounds() []Outbound
Outbound(tag string) (Outbound, bool)
UpdatedAt() time.Time
HealthCheck(ctx context.Context) (map[string]uint16, error)
RegisterCallback(callback ProviderUpdateCallback) *list.Element[ProviderUpdateCallback]
UnregisterCallback(element *list.Element[ProviderUpdateCallback])
}
type ProviderUpdater interface {
Update() error
}
type ProviderSubscriptionInfo interface {
SubscriptionInfo() SubscriptionInfo
}
type ProviderRegistry interface {
option.ProviderOptionsRegistry
CreateProvider(ctx context.Context, router Router, logFactory log.Factory, tag string, providerType string, options any) (Provider, error)
}
type ProviderManager interface {
Lifecycle
Providers() []Provider
Get(tag string) (Provider, bool)
Remove(tag string) error
Create(ctx context.Context, router Router, logFactory log.Factory, tag string, providerType string, options any) error
}
type SubscriptionInfo struct {
Upload int64
Download int64
Total int64
Expire int64
}
type ProviderUpdateCallback = func(tag string) error
+315
View File
@@ -0,0 +1,315 @@
package provider
import (
"context"
"reflect"
"regexp"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/urltest"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common/batch"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/common/x/list"
"github.com/sagernet/sing/service"
)
type Adapter struct {
ctx context.Context
outbound adapter.OutboundManager
router adapter.Router
logFactory log.Factory
logger log.ContextLogger
providerType string
providerTag string
outbounds []adapter.Outbound
outboundsByTag map[string]adapter.Outbound
ticker *time.Ticker
checking atomic.Bool
history *urltest.HistoryStorage
callbackAccess sync.Mutex
callbacks list.List[adapter.ProviderUpdateCallback]
link string
enabled bool
removeEmojis bool
overrideDialerOptions *option.DialerOptions
timeout time.Duration
interval time.Duration
}
func NewAdapter(ctx context.Context, router adapter.Router, outbound adapter.OutboundManager, logFactory log.Factory, logger log.ContextLogger, providerTag string, providerType string, options option.ProviderHealthCheckOptions) Adapter {
timeout := time.Duration(options.Timeout)
if timeout == 0 {
timeout = 3 * time.Second
}
interval := time.Duration(options.Interval)
if interval == 0 {
interval = 10 * time.Minute
}
if interval < time.Minute {
interval = time.Minute
}
return Adapter{
ctx: ctx,
outbound: outbound,
router: router,
logFactory: logFactory,
logger: logger,
providerType: providerType,
providerTag: providerTag,
enabled: options.Enabled,
link: options.URL,
timeout: timeout,
interval: interval,
}
}
func (a *Adapter) SetRemoveEmojis(remove bool) {
a.removeEmojis = remove
}
func (a *Adapter) SetOverrideDialerOptions(options *option.DialerOptions) {
a.overrideDialerOptions = options
}
func (a *Adapter) Start() error {
a.history = service.PtrFromContext[urltest.HistoryStorage](a.ctx)
if a.history == nil {
a.history = urltest.NewHistoryStorage()
}
go a.loopCheck()
return nil
}
func (a *Adapter) Type() string {
return a.providerType
}
func (a *Adapter) Tag() string {
return a.providerTag
}
func (a *Adapter) Outbounds() []adapter.Outbound {
return a.outbounds
}
func (a *Adapter) Outbound(tag string) (adapter.Outbound, bool) {
if a.outboundsByTag == nil {
return nil, false
}
detour, ok := a.outboundsByTag[tag]
return detour, ok
}
func (a *Adapter) UpdateOutbounds(oldOpts []option.Outbound, newOpts []option.Outbound) {
if a.removeEmojis {
removeEmojisFromTags(newOpts)
}
uniquifyTags(newOpts)
a.removeUseless(newOpts)
var (
oldOptByTag = make(map[string]option.Outbound)
outbounds = make([]adapter.Outbound, 0, len(newOpts))
outboundsByTag = make(map[string]adapter.Outbound)
)
for _, opt := range oldOpts {
oldOptByTag[opt.Tag] = opt
}
for i, opt := range newOpts {
if a.overrideDialerOptions != nil {
if wrapper, ok := opt.Options.(option.DialerOptionsWrapper); ok {
wrapper.ReplaceDialerOptions(*a.overrideDialerOptions)
}
}
var tag string
if opt.Tag != "" {
tag = F.ToString(a.providerTag, "/", opt.Tag)
} else {
tag = F.ToString(a.providerTag, "/", i)
}
outbound, exist := a.outbound.Outbound(tag)
if !exist || !reflect.DeepEqual(opt, oldOptByTag[opt.Tag]) {
err := a.outbound.Create(
adapter.WithContext(a.ctx, &adapter.InboundContext{
Outbound: tag,
}),
a.router,
a.logFactory.NewLogger(F.ToString("outbound/", opt.Type, "[", tag, "]")),
tag,
opt.Type,
opt.Options,
)
if err != nil {
a.logger.Warn(err, " in ", tag, ", skip create this outbound")
continue
}
outbound, _ = a.outbound.Outbound(tag)
}
outbounds = append(outbounds, outbound)
outboundsByTag[tag] = outbound
}
if a.enabled && a.history != nil {
go a.HealthCheck(a.ctx)
}
a.outbounds = outbounds
a.outboundsByTag = outboundsByTag
}
func (a *Adapter) HealthCheck(ctx context.Context) (map[string]uint16, error) {
if a.ticker != nil {
a.ticker.Reset(a.interval)
}
return a.healthcheck(ctx)
}
func (a *Adapter) RegisterCallback(callback adapter.ProviderUpdateCallback) *list.Element[adapter.ProviderUpdateCallback] {
a.callbackAccess.Lock()
defer a.callbackAccess.Unlock()
return a.callbacks.PushBack(callback)
}
func (a *Adapter) UnregisterCallback(element *list.Element[adapter.ProviderUpdateCallback]) {
a.callbackAccess.Lock()
defer a.callbackAccess.Unlock()
a.callbacks.Remove(element)
}
func (a *Adapter) UpdateGroups() {
for element := a.callbacks.Front(); element != nil; element = element.Next() {
element.Value(a.providerTag)
}
}
func (a *Adapter) Close() error {
if a.ticker != nil {
a.ticker.Stop()
}
outbounds := a.outbounds
a.outbounds = nil
var err error
for _, ob := range outbounds {
if err2 := a.outbound.Remove(ob.Tag()); err2 != nil {
err = E.Append(err, err2, func(err error) error {
return E.Cause(err, "close outbound [", ob.Tag(), "]")
})
}
}
return err
}
func (a *Adapter) loopCheck() {
if !a.enabled {
return
}
a.ticker = time.NewTicker(a.interval)
a.healthcheck(a.ctx)
for {
select {
case <-a.ctx.Done():
return
case <-a.ticker.C:
a.healthcheck(a.ctx)
}
}
}
func (a *Adapter) healthcheck(ctx context.Context) (map[string]uint16, error) {
result := make(map[string]uint16)
if a.checking.Swap(true) {
return result, nil
}
defer a.checking.Store(false)
b, _ := batch.New(ctx, batch.WithConcurrencyNum[any](10))
var resultAccess sync.Mutex
checked := make(map[string]bool)
for _, detour := range a.outbounds {
tag := detour.Tag()
if checked[tag] {
continue
}
checked[tag] = true
b.Go(tag, func() (any, error) {
ctx, cancel := context.WithTimeout(a.ctx, a.timeout)
defer cancel()
t, err := urltest.URLTest(ctx, a.link, detour)
if err != nil {
a.logger.Debug("outbound ", tag, " unavailable: ", err)
a.history.DeleteURLTestHistory(tag)
} else {
a.logger.Debug("outbound ", tag, " available: ", t, "ms")
a.history.StoreURLTestHistory(tag, &adapter.URLTestHistory{
Time: time.Now(),
Delay: t,
})
resultAccess.Lock()
result[tag] = t
resultAccess.Unlock()
}
return nil, nil
})
}
b.Wait()
return result, nil
}
func (a *Adapter) removeUseless(newOpts []option.Outbound) {
if len(a.outbounds) == 0 {
return
}
exists := make(map[string]bool)
for i, opt := range newOpts {
var tag string
if opt.Tag != "" {
tag = F.ToString(a.providerTag, "/", opt.Tag)
} else {
tag = F.ToString(a.providerTag, "/", i)
}
exists[tag] = true
}
for _, opt := range a.outbounds {
if !exists[opt.Tag()] {
if err := a.outbound.Remove(opt.Tag()); err != nil {
a.logger.Error(err, "close outbound [", opt.Tag(), "]")
}
}
}
}
func uniquifyTags(opts []option.Outbound) {
count := make(map[string]int)
for i, opt := range opts {
count[opt.Tag]++
if count[opt.Tag] > 1 {
opts[i].Tag = F.ToString(opt.Tag, " #", count[opt.Tag])
}
}
}
func removeEmojisFromTags(opts []option.Outbound) {
for i, opt := range opts {
cleaned := flagRegex.ReplaceAllStringFunc(opt.Tag, flagToCountryCode)
cleaned = emojiRegex.ReplaceAllString(cleaned, "")
cleaned = multiSpaceRegex.ReplaceAllString(cleaned, " ")
opts[i].Tag = strings.TrimSpace(cleaned)
}
}
func flagToCountryCode(flag string) string {
runes := []rune(flag)
if len(runes) == 2 {
return string(rune(runes[0]-0x1F1E6+'A')) + string(rune(runes[1]-0x1F1E6+'A')) + " "
}
return ""
}
var flagRegex = regexp.MustCompile(`[\x{1F1E6}-\x{1F1FF}]{2}`)
var emojiRegex = regexp.MustCompile(`[\x{1F1E0}-\x{1F1FF}\x{1F300}-\x{1F9FF}\x{2600}-\x{27BF}\x{FE00}-\x{FE0F}\x{200D}]+`)
var multiSpaceRegex = regexp.MustCompile(`\s{2,}`)
+45
View File
@@ -0,0 +1,45 @@
package provider
import (
"testing"
"github.com/sagernet/sing-box/option"
)
func TestFlagToCountryCodeAllFlags(t *testing.T) {
for first := 'A'; first <= 'Z'; first++ {
for second := 'A'; second <= 'Z'; second++ {
flag := string(rune(0x1F1E6+(first-'A'))) + string(rune(0x1F1E6+(second-'A')))
expected := string(first) + string(second)
result := flagToCountryCode(flag)
// flagToCountryCode appends a space
if result != expected+" " {
t.Errorf("flagToCountryCode(%q) = %q, want %q", expected, result, expected+" ")
}
}
}
}
func TestRemoveEmojisFromTags(t *testing.T) {
tests := []struct {
input string
expected string
}{
{"🇺🇸 United States", "US United States"},
{"🇷🇺 Россия", "RU Россия"},
{"🇩🇪 Germany 🚀", "DE Germany"},
{"🇫🇷🇬🇧 France-UK", "FR GB France-UK"},
{"No emojis here", "No emojis here"},
{"🌍 World", "World"},
{"🇯🇵 Tokyo ⚡ Fast", "JP Tokyo Fast"},
{"Germany 🇩🇪", "Germany DE"},
{"Server 🇺🇸 Node", "Server US Node"},
}
for _, tt := range tests {
opts := []option.Outbound{{Tag: tt.input}}
removeEmojisFromTags(opts)
if opts[0].Tag != tt.expected {
t.Errorf("removeEmojisFromTags(%q) = %q, want %q", tt.input, opts[0].Tag, tt.expected)
}
}
}
+157
View File
@@ -0,0 +1,157 @@
package provider
import (
"context"
"io"
"os"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/taskmonitor"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
)
var _ adapter.ProviderManager = (*Manager)(nil)
type Manager struct {
logger log.ContextLogger
registry adapter.ProviderRegistry
access sync.Mutex
started bool
stage adapter.StartStage
providers []adapter.Provider
providerByTag map[string]adapter.Provider
wg sync.WaitGroup
}
func NewManager(logger logger.ContextLogger, registry adapter.ProviderRegistry) *Manager {
return &Manager{
logger: logger,
registry: registry,
providerByTag: make(map[string]adapter.Provider),
}
}
func (m *Manager) Initialize() {
}
func (m *Manager) Start(stage adapter.StartStage) error {
m.access.Lock()
if m.started && m.stage >= stage {
panic("already started")
}
m.started = true
m.stage = stage
providers := m.providers
m.access.Unlock()
for _, provider := range providers {
err := adapter.LegacyStart(provider, stage)
if err != nil {
return E.Cause(err, stage, " provider/", provider.Type(), "[", provider.Tag(), "]")
}
}
return nil
}
func (m *Manager) Close() error {
monitor := taskmonitor.New(m.logger, C.StopTimeout)
m.access.Lock()
if !m.started {
m.access.Unlock()
return nil
}
m.started = false
providers := m.providers
m.providers = nil
m.access.Unlock()
var err error
for _, provider := range providers {
if closer, isCloser := provider.(io.Closer); isCloser {
monitor.Start("close provider/", provider.Type(), "[", provider.Tag(), "]")
err = E.Append(err, closer.Close(), func(err error) error {
return E.Cause(err, "close provider/", provider.Type(), "[", provider.Tag(), "]")
})
monitor.Finish()
}
}
return nil
}
func (m *Manager) Providers() []adapter.Provider {
m.access.Lock()
defer m.access.Unlock()
return m.providers
}
func (m *Manager) Get(tag string) (adapter.Provider, bool) {
m.access.Lock()
provider, found := m.providerByTag[tag]
m.access.Unlock()
return provider, found
}
func (m *Manager) Remove(tag string) error {
m.access.Lock()
provider, found := m.providerByTag[tag]
if !found {
m.access.Unlock()
return os.ErrInvalid
}
delete(m.providerByTag, tag)
index := common.Index(m.providers, func(it adapter.Provider) bool {
return it == provider
})
if index == -1 {
panic("invalid provider index")
}
m.providers = append(m.providers[:index], m.providers[index+1:]...)
started := m.started
m.access.Unlock()
if started {
return common.Close(provider)
}
return nil
}
func (m *Manager) Create(ctx context.Context, router adapter.Router, logFactory log.Factory, tag string, providerType string, options any) error {
if tag == "" {
return os.ErrInvalid
}
provider, err := m.registry.CreateProvider(ctx, router, logFactory, tag, providerType, options)
if err != nil {
return err
}
m.access.Lock()
defer m.access.Unlock()
if m.started {
for _, stage := range adapter.ListStartStages {
err = adapter.LegacyStart(provider, stage)
if err != nil {
return E.Cause(err, stage, " provider/", provider.Type(), "[", provider.Tag(), "]")
}
}
}
if existsProvider, loaded := m.providerByTag[tag]; loaded {
if m.started {
err = common.Close(existsProvider)
if err != nil {
return E.Cause(err, "close provider", provider.Type(), "[", existsProvider.Tag(), "]")
}
}
existsIndex := common.Index(m.providers, func(it adapter.Provider) bool {
return it == existsProvider
})
if existsIndex == -1 {
panic("invalid provider index")
}
m.providers = append(m.providers[:existsIndex], m.providers[existsIndex+1:]...)
}
m.providers = append(m.providers, provider)
m.providerByTag[tag] = provider
return nil
}
+72
View File
@@ -0,0 +1,72 @@
package provider
import (
"context"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
type ConstructorFunc[T any] func(ctx context.Context, router adapter.Router, logFactory log.Factory, tag string, options T) (adapter.Provider, error)
func Register[Options any](registry *Registry, providerType string, constructor ConstructorFunc[Options]) {
registry.register(providerType, func() any {
return new(Options)
}, func(ctx context.Context, router adapter.Router, logFactory log.Factory, tag string, rawOptions any) (adapter.Provider, error) {
var options *Options
if rawOptions != nil {
options = rawOptions.(*Options)
}
return constructor(ctx, router, logFactory, tag, common.PtrValueOrDefault(options))
})
}
var _ adapter.ProviderRegistry = (*Registry)(nil)
type (
optionsConstructorFunc func() any
constructorFunc func(ctx context.Context, router adapter.Router, logFactory log.Factory, tag string, options any) (adapter.Provider, error)
)
type Registry struct {
access sync.Mutex
optionsType map[string]optionsConstructorFunc
constructors map[string]constructorFunc
}
func NewRegistry() *Registry {
return &Registry{
optionsType: make(map[string]optionsConstructorFunc),
constructors: make(map[string]constructorFunc),
}
}
func (r *Registry) CreateOptions(providerType string) (any, bool) {
r.access.Lock()
defer r.access.Unlock()
optionsConstructor, loaded := r.optionsType[providerType]
if !loaded {
return nil, false
}
return optionsConstructor(), true
}
func (r *Registry) CreateProvider(ctx context.Context, router adapter.Router, logFactory log.Factory, tag string, providerType string, options any) (adapter.Provider, error) {
r.access.Lock()
defer r.access.Unlock()
constructor, loaded := r.constructors[providerType]
if !loaded {
return nil, E.New("provider type not found: '" + providerType + "'")
}
return constructor(ctx, router, logFactory, tag, options)
}
func (r *Registry) register(providerType string, optionsConstructor optionsConstructorFunc, constructor constructorFunc) {
r.access.Lock()
defer r.access.Unlock()
r.optionsType[providerType] = optionsConstructor
r.constructors[providerType] = constructor
}
+132 -35
View File
@@ -4,54 +4,151 @@ import (
"context"
"net"
"net/netip"
"time"
"github.com/sagernet/sing-box/common/geoip"
"github.com/sagernet/sing-dns"
"github.com/sagernet/sing-tun"
"github.com/sagernet/sing/common/control"
"github.com/sagernet/sing-tun/gtcpip/header"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
"github.com/sagernet/sing/common/x/list"
"golang.org/x/net/dns/dnsmessage"
"go4.org/netipx"
)
type Router interface {
Service
Lifecycle
ConnectionRouter
PreMatch(metadata InboundContext, firstPacket []byte) PreMatchResult
HijackDNSPacket(ctx context.Context, payload []byte, writer N.PacketWriter, metadata InboundContext)
ConnectionRouterEx
RuleSet(tag string) (RuleSet, bool)
Rules() []Rule
NeedFindProcess() bool
NeedFindNeighbor() bool
NeighborResolver() NeighborResolver
AppendTracker(tracker ConnectionTracker)
ResetNetwork()
}
Outbounds() []Outbound
Outbound(tag string) (Outbound, bool)
DefaultOutbound(network string) Outbound
type PreMatchAction uint8
const (
PreMatchContinue PreMatchAction = iota
PreMatchFlow
PreMatchReject
PreMatchDrop
PreMatchBypass
PreMatchHijackDNS
)
type PreMatchResult struct {
Action PreMatchAction
Outbound Outbound
Destination netip.AddrPort
UDPTimeout time.Duration
NewTracker func() tun.FlowTracker
}
func JudgeFlow(router Router, inbound string, inboundType string, network uint8, source netip.AddrPort, destination netip.AddrPort, firstPacket []byte) tun.FlowVerdict {
var networkName string
switch network {
case uint8(header.TCPProtocolNumber):
networkName = N.NetworkTCP
case uint8(header.UDPProtocolNumber):
networkName = N.NetworkUDP
case uint8(header.ICMPv4ProtocolNumber), uint8(header.ICMPv6ProtocolNumber):
networkName = N.NetworkICMP
default:
return tun.FlowVerdict{Action: tun.ActionAccept}
}
metadata := InboundContext{
Inbound: inbound,
InboundType: inboundType,
Network: networkName,
Source: M.SocksaddrFromNetIP(source),
Destination: M.SocksaddrFromNetIP(destination),
}
if networkName == N.NetworkICMP {
metadata.Source.Port = 0
metadata.Destination.Port = 0
}
result := router.PreMatch(metadata, firstPacket)
switch result.Action {
case PreMatchFlow:
port, isPort := result.Outbound.(tun.Port)
if !isPort {
return tun.FlowVerdict{Action: tun.ActionAccept}
}
verdict := tun.FlowVerdict{Action: tun.ActionFlow, Port: port, UDPTimeout: result.UDPTimeout, NewTracker: result.NewTracker}
if result.Destination.IsValid() {
destinationPort := result.Destination.Port()
if networkName == N.NetworkICMP {
destinationPort = destination.Port()
}
verdict.Destination = netip.AddrPortFrom(result.Destination.Addr(), destinationPort)
}
return verdict
case PreMatchReject:
return tun.FlowVerdict{Action: tun.ActionReject}
case PreMatchDrop:
return tun.FlowVerdict{Action: tun.ActionDrop}
case PreMatchBypass:
return tun.FlowVerdict{Action: tun.ActionBypass}
case PreMatchHijackDNS:
return tun.FlowVerdict{Action: tun.ActionHijackDNS}
default:
return tun.FlowVerdict{Action: tun.ActionAccept}
}
}
type ConnectionTracker interface {
RoutedConnection(ctx context.Context, conn net.Conn, metadata InboundContext, matchedRule Rule, matchOutbound Outbound) net.Conn
RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext, matchedRule Rule, matchOutbound Outbound) N.PacketConn
RoutedFlow(ctx context.Context, metadata InboundContext, matchedRule Rule, matchOutbound Outbound) tun.FlowTracker
}
// Deprecated: Use ConnectionRouterEx instead.
type ConnectionRouter interface {
RouteConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
GeoIPReader() *geoip.Reader
LoadGeosite(code string) (Rule, error)
Exchange(ctx context.Context, message *dnsmessage.Message) (*dnsmessage.Message, error)
Lookup(ctx context.Context, domain string, strategy dns.DomainStrategy) ([]netip.Addr, error)
LookupDefault(ctx context.Context, domain string) ([]netip.Addr, error)
InterfaceBindManager() control.BindManager
DefaultInterface() string
AutoDetectInterface() bool
DefaultMark() int
NetworkMonitor() tun.NetworkUpdateMonitor
InterfaceMonitor() tun.DefaultInterfaceMonitor
PackageManager() tun.PackageManager
Rules() []Rule
SetTrafficController(controller TrafficController)
}
type Rule interface {
Service
Type() string
UpdateGeosite() error
Match(metadata *InboundContext) bool
Outbound() string
String() string
type ConnectionRouterEx interface {
ConnectionRouter
RouteConnectionEx(ctx context.Context, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
RoutePacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
}
type DNSRule interface {
Rule
DisableCache() bool
type RuleSet interface {
Name() string
StartContext(ctx context.Context, startContext *HTTPStartContext) error
Metadata() RuleSetMetadata
ExtractIPSet() []*netipx.IPSet
IncRef()
DecRef()
Cleanup()
RegisterCallback(callback RuleSetUpdateCallback) *list.Element[RuleSetUpdateCallback]
UnregisterCallback(element *list.Element[RuleSetUpdateCallback])
Close() error
HeadlessRule
}
type RuleSetUpdateCallback func(it RuleSet)
type DNSRuleSetUpdateValidator interface {
ValidateRuleSetMetadataUpdate(tag string, metadata RuleSetMetadata) error
}
// ip_version is not a headless-rule item, so ContainsIPVersionRule is intentionally absent.
type RuleSetMetadata struct {
ContainsProcessRule bool
ContainsWIFIRule bool
ContainsIPCIDRRule bool
ContainsDNSQueryTypeRule bool
// ContainsNonIPCIDRRule signals that the rule-set carries at least one sub-rule
// with a predicate other than destination ip_cidr / ip_set, so it can contribute
// to DNS pre-response matching. A rule-set where this is false and
// ContainsIPCIDRRule is true is "pure-IP" and matches nothing before a DNS
// response is available.
ContainsNonIPCIDRRule bool
}
+44
View File
@@ -0,0 +1,44 @@
package adapter
import (
C "github.com/sagernet/sing-box/constant"
"github.com/miekg/dns"
)
type HeadlessRule interface {
Match(metadata *InboundContext) bool
String() string
}
type Rule interface {
HeadlessRule
SimpleLifecycle
Type() string
Action() RuleAction
}
type DNSRule interface {
Rule
LegacyPreMatch(metadata *InboundContext) bool
WithAddressLimit() bool
MatchAddressLimit(metadata *InboundContext, response *dns.Msg) bool
MatchResponseTag() string
MatchResponseTags() []string
MatchResponseAnonymous() bool
Race() bool
}
type RuleAction interface {
Type() string
String() string
}
func IsFinalAction(action RuleAction) bool {
switch action.Type() {
case C.RuleActionTypeSniff, C.RuleActionTypeResolve, C.RuleActionTypeEvaluate:
return false
default:
return true
}
}
+19
View File
@@ -0,0 +1,19 @@
package adapter
import (
"context"
"github.com/sagernet/sing/service"
)
type SecurityPolicy interface {
CheckFeature(ctx context.Context, feature string) error
}
func CheckSecurityFeature(ctx context.Context, feature string) error {
policy := service.FromContext[SecurityPolicy](ctx)
if policy == nil {
return nil
}
return policy.CheckFeature(ctx, feature)
}
+23 -2
View File
@@ -1,6 +1,27 @@
package adapter
import (
"context"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
)
type Service interface {
Start() error
Close() error
Lifecycle
Type() string
Tag() string
}
type ServiceRegistry interface {
option.ServiceOptionsRegistry
Create(ctx context.Context, logger log.ContextLogger, tag string, serviceType string, options any) (Service, error)
}
type ServiceManager interface {
Lifecycle
Services() []Service
Get(tag string) (Service, bool)
Remove(tag string) error
Create(ctx context.Context, logger log.ContextLogger, tag string, serviceType string, options any) error
}
+21
View File
@@ -0,0 +1,21 @@
package service
type Adapter struct {
serviceType string
serviceTag string
}
func NewAdapter(serviceType string, serviceTag string) Adapter {
return Adapter{
serviceType: serviceType,
serviceTag: serviceTag,
}
}
func (a *Adapter) Type() string {
return a.serviceType
}
func (a *Adapter) Tag() string {
return a.serviceTag
}
+153
View File
@@ -0,0 +1,153 @@
package service
import (
"context"
"os"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/taskmonitor"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
var _ adapter.ServiceManager = (*Manager)(nil)
type Manager struct {
logger log.ContextLogger
registry adapter.ServiceRegistry
access sync.Mutex
started bool
stage adapter.StartStage
services []adapter.Service
serviceByTag map[string]adapter.Service
}
func NewManager(logger log.ContextLogger, registry adapter.ServiceRegistry) *Manager {
return &Manager{
logger: logger,
registry: registry,
serviceByTag: make(map[string]adapter.Service),
}
}
func (m *Manager) Start(stage adapter.StartStage) error {
m.access.Lock()
if m.started && m.stage >= stage {
panic("already started")
}
m.started = true
m.stage = stage
services := m.services
m.access.Unlock()
for _, service := range services {
name := "service/" + service.Type() + "[" + service.Tag() + "]"
done := adapter.LogElapsed(m.logger, stage, " ", name)
err := adapter.LegacyStart(service, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
return nil
}
func (m *Manager) Close() error {
m.access.Lock()
defer m.access.Unlock()
if !m.started {
return nil
}
m.started = false
services := m.services
m.services = nil
monitor := taskmonitor.New(m.logger, C.StopTimeout)
var err error
for _, service := range services {
name := "service/" + service.Type() + "[" + service.Tag() + "]"
done := adapter.LogElapsed(m.logger, "close ", name)
monitor.Start("close ", name)
err = E.Append(err, service.Close(), func(err error) error {
return E.Cause(err, "close ", name)
})
monitor.Finish()
done()
}
return nil
}
func (m *Manager) Services() []adapter.Service {
m.access.Lock()
defer m.access.Unlock()
return m.services
}
func (m *Manager) Get(tag string) (adapter.Service, bool) {
m.access.Lock()
service, found := m.serviceByTag[tag]
m.access.Unlock()
return service, found
}
func (m *Manager) Remove(tag string) error {
m.access.Lock()
service, found := m.serviceByTag[tag]
if !found {
m.access.Unlock()
return os.ErrInvalid
}
delete(m.serviceByTag, tag)
index := common.Index(m.services, func(it adapter.Service) bool {
return it == service
})
if index == -1 {
panic("invalid service index")
}
m.services = append(m.services[:index], m.services[index+1:]...)
started := m.started
m.access.Unlock()
if started {
return service.Close()
}
return nil
}
func (m *Manager) Create(ctx context.Context, logger log.ContextLogger, tag string, serviceType string, options any) error {
service, err := m.registry.Create(ctx, logger, tag, serviceType, options)
if err != nil {
return err
}
m.access.Lock()
defer m.access.Unlock()
if m.started {
name := "service/" + service.Type() + "[" + service.Tag() + "]"
for _, stage := range adapter.ListStartStages {
done := adapter.LogElapsed(m.logger, stage, " ", name)
err = adapter.LegacyStart(service, stage)
done()
if err != nil {
return E.Cause(err, stage, " ", name)
}
}
}
if existsService, loaded := m.serviceByTag[tag]; loaded {
if m.started {
err = existsService.Close()
if err != nil {
return E.Cause(err, "close service/", existsService.Type(), "[", existsService.Tag(), "]")
}
}
existsIndex := common.Index(m.services, func(it adapter.Service) bool {
return it == existsService
})
if existsIndex == -1 {
panic("invalid service index")
}
m.services = append(m.services[:existsIndex], m.services[existsIndex+1:]...)
}
m.services = append(m.services, service)
m.serviceByTag[tag] = service
return nil
}
+80
View File
@@ -0,0 +1,80 @@
package service
import (
"context"
"maps"
"slices"
"sync"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
type ConstructorFunc[T any] func(ctx context.Context, logger log.ContextLogger, tag string, options T) (adapter.Service, error)
func Register[Options any](registry *Registry, outboundType string, constructor ConstructorFunc[Options]) {
registry.register(outboundType, func() any {
return new(Options)
}, func(ctx context.Context, logger log.ContextLogger, tag string, rawOptions any) (adapter.Service, error) {
var options *Options
if rawOptions != nil {
options = rawOptions.(*Options)
}
return constructor(ctx, logger, tag, common.PtrValueOrDefault(options))
})
}
var _ adapter.ServiceRegistry = (*Registry)(nil)
type (
optionsConstructorFunc func() any
constructorFunc func(ctx context.Context, logger log.ContextLogger, tag string, options any) (adapter.Service, error)
)
type Registry struct {
access sync.Mutex
optionsType map[string]optionsConstructorFunc
constructor map[string]constructorFunc
}
func NewRegistry() *Registry {
return &Registry{
optionsType: make(map[string]optionsConstructorFunc),
constructor: make(map[string]constructorFunc),
}
}
func (m *Registry) OptionTypes() []string {
m.access.Lock()
defer m.access.Unlock()
return slices.Sorted(maps.Keys(m.optionsType))
}
func (m *Registry) CreateOptions(outboundType string) (any, bool) {
m.access.Lock()
defer m.access.Unlock()
optionsConstructor, loaded := m.optionsType[outboundType]
if !loaded {
return nil, false
}
return optionsConstructor(), true
}
func (m *Registry) Create(ctx context.Context, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Service, error) {
m.access.Lock()
defer m.access.Unlock()
constructor, loaded := m.constructor[outboundType]
if !loaded {
return nil, E.New("outbound type not found: " + outboundType)
}
return constructor(ctx, logger, tag, options)
}
func (m *Registry) register(outboundType string, optionsConstructor optionsConstructorFunc, constructor constructorFunc) {
m.access.Lock()
defer m.access.Unlock()
m.optionsType[outboundType] = optionsConstructor
m.constructor[outboundType] = constructor
}
+18
View File
@@ -0,0 +1,18 @@
package adapter
import (
"net"
N "github.com/sagernet/sing/common/network"
)
type ManagedSSMServer interface {
Inbound
SetTracker(tracker SSMTracker)
UpdateUsers(users []string, uPSKs []string) error
}
type SSMTracker interface {
TrackConnection(conn net.Conn, metadata InboundContext) net.Conn
TrackPacketConnection(conn N.PacketConn, metadata InboundContext) N.PacketConn
}
+104
View File
@@ -0,0 +1,104 @@
package adapter
import (
"context"
"io"
"time"
)
type TailscaleEndpoint interface {
SubscribeTailscaleStatus(ctx context.Context, fn func(*TailscaleEndpointStatus)) error
StartTailscalePing(ctx context.Context, peerIP string, fn func(*TailscalePingResult)) error
SetTailscaleExitNode(ctx context.Context, stableID string) error
Logout(ctx context.Context) error
GetTailscaleCertificate(ctx context.Context, domain string, minValidity time.Duration) (certificatePEM []byte, privateKeyPEM []byte, err error)
SubscribeTaildropInbox(ctx context.Context, fn func(*TaildropInbox)) error
MarkTaildropInboxRead() error
SendTaildropFile(ctx context.Context, peerStableID string, fileName string, size int64, content io.Reader, progress func(sentBytes int64)) error
OpenTaildropFile(fileName string) (io.ReadCloser, int64, error)
DeleteTaildropFile(fileName string) error
CancelTaildropReceiving(senderID string, fileName string) error
}
type TaildropInbox struct {
Files []*TaildropFile
Receiving []*TaildropReceivingFile
}
type TaildropFile struct {
Name string
Size int64
SenderName string
ModifiedAt int64
}
type TaildropReceivingFile struct {
Name string
Size int64
ReceivedBytes int64
SenderID string
SenderName string
}
type TailscalePingResult struct {
LatencyMs float64
IsDirect bool
Endpoint string
PeerRelay string
DERPRegionID int32
DERPRegionCode string
Error string
}
type TailscaleEndpointStatus struct {
BackendState string
AuthURL string
NetworkName string
MagicDNSSuffix string
Self *TailscalePeer
ExitNode *TailscalePeer
UserGroups []*TailscaleUserGroup
KeyAuth bool
CanShareFiles bool
WaitingFileCount int32
ReceivingFileCount int32
UnreadFileCount int32
CertDomains []string
}
type TailscaleUserGroup struct {
UserID int64
LoginName string
DisplayName string
ProfilePicURL string
Peers []*TailscalePeer
}
type TailscalePeer struct {
StableID string
HostName string
DNSName string
OS string
TailscaleIPs []string
SSHHostKeys []string
Online bool
ExitNode bool
ExitNodeOption bool
ShareeNode bool
Expired bool
Active bool
CanReceiveFiles bool
RxBytes int64
TxBytes int64
UserID int64
KeyExpiry int64
LastSeen int64
}
type ShellSession interface {
MasterFD() int32
Resize(rows int32, cols int32) error
Signal(signal int32) error
WaitExit() (int32, error)
Close() error
}
+8
View File
@@ -0,0 +1,8 @@
package adapter
import "time"
type TimeService interface {
SimpleLifecycle
TimeFunc() func() time.Time
}
+112 -37
View File
@@ -4,27 +4,24 @@ import (
"context"
"net"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
type (
ConnectionHandlerFunc = func(ctx context.Context, conn net.Conn, metadata InboundContext) error
PacketConnectionHandlerFunc = func(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
ConnectionHandlerFunc = func(ctx context.Context, conn net.Conn, metadata InboundContext, onClose N.CloseHandlerFunc)
PacketConnectionHandlerFunc = func(ctx context.Context, conn N.PacketConn, metadata InboundContext, onClose N.CloseHandlerFunc)
)
func NewUpstreamHandler(
metadata InboundContext,
connectionHandler ConnectionHandlerFunc,
packetHandler PacketConnectionHandlerFunc,
errorHandler E.Handler,
) UpstreamHandlerAdapter {
return &myUpstreamHandlerWrapper{
metadata: metadata,
connectionHandler: connectionHandler,
packetHandler: packetHandler,
errorHandler: errorHandler,
}
}
@@ -34,60 +31,138 @@ type myUpstreamHandlerWrapper struct {
metadata InboundContext
connectionHandler ConnectionHandlerFunc
packetHandler PacketConnectionHandlerFunc
errorHandler E.Handler
}
func (w *myUpstreamHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
w.metadata.Destination = metadata.Destination
return w.connectionHandler(ctx, conn, w.metadata)
}
func (w *myUpstreamHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
w.metadata.Destination = metadata.Destination
return w.packetHandler(ctx, conn, w.metadata)
}
func (w *myUpstreamHandlerWrapper) NewError(ctx context.Context, err error) {
w.errorHandler.NewError(ctx, err)
}
func UpstreamMetadata(metadata InboundContext) M.Metadata {
return M.Metadata{
Source: metadata.Source,
Destination: metadata.Destination,
func (w *myUpstreamHandlerWrapper) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
myMetadata := w.metadata
if source.IsValid() {
myMetadata.Source = source
}
if destination.IsValid() {
myMetadata.Destination = destination
}
w.connectionHandler(ctx, conn, myMetadata, onClose)
}
func (w *myUpstreamHandlerWrapper) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
myMetadata := w.metadata
if source.IsValid() {
myMetadata.Source = source
}
if destination.IsValid() {
myMetadata.Destination = destination
}
w.packetHandler(ctx, conn, myMetadata, onClose)
}
var _ UpstreamHandlerAdapter = (*myUpstreamContextHandlerWrapper)(nil)
type myUpstreamContextHandlerWrapper struct {
connectionHandler ConnectionHandlerFunc
packetHandler PacketConnectionHandlerFunc
errorHandler E.Handler
}
func NewUpstreamContextHandler(
connectionHandler ConnectionHandlerFunc,
packetHandler PacketConnectionHandlerFunc,
errorHandler E.Handler,
) UpstreamHandlerAdapter {
return &myUpstreamContextHandlerWrapper{
connectionHandler: connectionHandler,
packetHandler: packetHandler,
errorHandler: errorHandler,
}
}
func (w *myUpstreamContextHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
myMetadata.Destination = metadata.Destination
return w.connectionHandler(ctx, conn, *myMetadata)
func (w *myUpstreamContextHandlerWrapper) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
_, myMetadata := ExtendContext(ctx)
if source.IsValid() {
myMetadata.Source = source
}
if destination.IsValid() {
myMetadata.Destination = destination
}
w.connectionHandler(ctx, conn, *myMetadata, onClose)
}
func (w *myUpstreamContextHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
myMetadata.Destination = metadata.Destination
return w.packetHandler(ctx, conn, *myMetadata)
func (w *myUpstreamContextHandlerWrapper) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
_, myMetadata := ExtendContext(ctx)
if source.IsValid() {
myMetadata.Source = source
}
if destination.IsValid() {
myMetadata.Destination = destination
}
w.packetHandler(ctx, conn, *myMetadata, onClose)
}
func (w *myUpstreamContextHandlerWrapper) NewError(ctx context.Context, err error) {
w.errorHandler.NewError(ctx, err)
func NewRouteHandler(
metadata InboundContext,
router ConnectionRouterEx,
) UpstreamHandlerAdapter {
return &routeHandlerWrapper{
metadata: metadata,
router: router,
}
}
var _ UpstreamHandlerAdapter = (*routeHandlerWrapper)(nil)
type routeHandlerWrapper struct {
metadata InboundContext
router ConnectionRouterEx
}
func (r *routeHandlerWrapper) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
if source.IsValid() {
r.metadata.Source = source
}
if destination.IsValid() {
r.metadata.Destination = destination
}
r.router.RouteConnectionEx(ctx, conn, r.metadata, onClose)
}
func (r *routeHandlerWrapper) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
if source.IsValid() {
r.metadata.Source = source
}
if destination.IsValid() {
r.metadata.Destination = destination
}
r.router.RoutePacketConnectionEx(ctx, conn, r.metadata, onClose)
}
func NewRouteContextHandler(
router ConnectionRouterEx,
) UpstreamHandlerAdapter {
return &routeContextHandlerWrapper{
router: router,
}
}
var _ UpstreamHandlerAdapter = (*routeContextHandlerWrapper)(nil)
type routeContextHandlerWrapper struct {
router ConnectionRouterEx
}
func (r *routeContextHandlerWrapper) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
_, metadata := ExtendContext(ctx)
if source.IsValid() {
metadata.Source = source
}
if destination.IsValid() {
metadata.Destination = destination
}
r.router.RouteConnectionEx(ctx, conn, *metadata, onClose)
}
func (r *routeContextHandlerWrapper) NewPacketConnectionEx(ctx context.Context, conn N.PacketConn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
_, metadata := ExtendContext(ctx)
if source.IsValid() {
metadata.Source = source
}
if destination.IsValid() {
metadata.Destination = destination
}
r.router.RoutePacketConnectionEx(ctx, conn, *metadata, onClose)
}
+243
View File
@@ -0,0 +1,243 @@
package adapter
import (
"context"
"net"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
type (
// Deprecated
LegacyConnectionHandlerFunc = func(ctx context.Context, conn net.Conn, metadata InboundContext) error
// Deprecated
LegacyPacketConnectionHandlerFunc = func(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
)
// Deprecated
//
//nolint:staticcheck
type LegacyUpstreamHandlerAdapter interface {
N.TCPConnectionHandler
N.UDPConnectionHandler
E.Handler
}
// Deprecated
//
//nolint:staticcheck
func NewLegacyUpstreamHandler(
metadata InboundContext,
connectionHandler LegacyConnectionHandlerFunc,
packetHandler LegacyPacketConnectionHandlerFunc,
errorHandler E.Handler,
) LegacyUpstreamHandlerAdapter {
return &legacyUpstreamHandlerWrapper{
metadata: metadata,
connectionHandler: connectionHandler,
packetHandler: packetHandler,
errorHandler: errorHandler,
}
}
var _ LegacyUpstreamHandlerAdapter = (*legacyUpstreamHandlerWrapper)(nil)
// Deprecated: use NewUpstreamHandler instead.
//
//nolint:staticcheck
type legacyUpstreamHandlerWrapper struct {
metadata InboundContext
connectionHandler LegacyConnectionHandlerFunc
packetHandler LegacyPacketConnectionHandlerFunc
errorHandler E.Handler
}
// Deprecated: use NewUpstreamHandler instead.
func (w *legacyUpstreamHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := w.metadata
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.connectionHandler(ctx, conn, myMetadata)
}
// Deprecated: use NewUpstreamHandler instead.
func (w *legacyUpstreamHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := w.metadata
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.packetHandler(ctx, conn, myMetadata)
}
// Deprecated: use NewUpstreamHandler instead.
func (w *legacyUpstreamHandlerWrapper) NewError(ctx context.Context, err error) {
w.errorHandler.NewError(ctx, err)
}
// Deprecated: removed
func UpstreamMetadata(metadata InboundContext) M.Metadata {
return M.Metadata{
Source: metadata.Source.Unwrap(),
Destination: metadata.Destination.Unwrap(),
}
}
// Deprecated: Use NewUpstreamContextHandler instead.
type legacyUpstreamContextHandlerWrapper struct {
connectionHandler LegacyConnectionHandlerFunc
packetHandler LegacyPacketConnectionHandlerFunc
errorHandler E.Handler
}
// Deprecated: Use NewUpstreamContextHandler instead.
func NewLegacyUpstreamContextHandler(
connectionHandler LegacyConnectionHandlerFunc,
packetHandler LegacyPacketConnectionHandlerFunc,
errorHandler E.Handler,
) LegacyUpstreamHandlerAdapter {
return &legacyUpstreamContextHandlerWrapper{
connectionHandler: connectionHandler,
packetHandler: packetHandler,
errorHandler: errorHandler,
}
}
// Deprecated: Use NewUpstreamContextHandler instead.
func (w *legacyUpstreamContextHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.connectionHandler(ctx, conn, *myMetadata)
}
// Deprecated: Use NewUpstreamContextHandler instead.
func (w *legacyUpstreamContextHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.packetHandler(ctx, conn, *myMetadata)
}
// Deprecated: Use NewUpstreamContextHandler instead.
func (w *legacyUpstreamContextHandlerWrapper) NewError(ctx context.Context, err error) {
w.errorHandler.NewError(ctx, err)
}
// Deprecated: Use ConnectionRouterEx instead.
func NewLegacyRouteHandler(
metadata InboundContext,
router ConnectionRouter,
logger logger.ContextLogger,
) LegacyUpstreamHandlerAdapter {
return &legacyRouteHandlerWrapper{
metadata: metadata,
router: router,
logger: logger,
}
}
// Deprecated: Use ConnectionRouterEx instead.
func NewLegacyRouteContextHandler(
router ConnectionRouter,
logger logger.ContextLogger,
) LegacyUpstreamHandlerAdapter {
return &legacyRouteContextHandlerWrapper{
router: router,
logger: logger,
}
}
var _ LegacyUpstreamHandlerAdapter = (*legacyRouteHandlerWrapper)(nil)
// Deprecated: Use ConnectionRouterEx instead.
//
//nolint:staticcheck
type legacyRouteHandlerWrapper struct {
metadata InboundContext
router ConnectionRouter
logger logger.ContextLogger
}
// Deprecated: Use ConnectionRouterEx instead.
func (w *legacyRouteHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := w.metadata
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RouteConnection(ctx, conn, myMetadata)
}
// Deprecated: Use ConnectionRouterEx instead.
func (w *legacyRouteHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := w.metadata
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RoutePacketConnection(ctx, conn, myMetadata)
}
// Deprecated: Use ConnectionRouterEx instead.
func (w *legacyRouteHandlerWrapper) NewError(ctx context.Context, err error) {
w.logger.ErrorContext(ctx, err)
}
var _ LegacyUpstreamHandlerAdapter = (*legacyRouteContextHandlerWrapper)(nil)
// Deprecated: Use ConnectionRouterEx instead.
type legacyRouteContextHandlerWrapper struct {
router ConnectionRouter
logger logger.ContextLogger
}
// Deprecated: Use ConnectionRouterEx instead.
func (w *legacyRouteContextHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RouteConnection(ctx, conn, *myMetadata)
}
// Deprecated: Use ConnectionRouterEx instead.
func (w *legacyRouteContextHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RoutePacketConnection(ctx, conn, *myMetadata)
}
// Deprecated: Use ConnectionRouterEx instead.
func (w *legacyRouteContextHandlerWrapper) NewError(ctx context.Context, err error) {
w.logger.ErrorContext(ctx, err)
}
+15
View File
@@ -0,0 +1,15 @@
//go:build with_usbip && (linux || (darwin && cgo) || windows)
package adapter
import (
"context"
"github.com/sagernet/sing-usbip"
)
type USBIPDynamicServer interface {
AddDevice(info usbip.ProvidedDeviceInfo, transport usbip.DeviceTransport) (string, error)
RemoveDevice(busID string)
SubscribeDevices(ctx context.Context, listener func([]usbip.ControlDeviceInfo))
}
+7
View File
@@ -0,0 +1,7 @@
//go:build !with_usbip || !(linux || (darwin && cgo) || windows)
package adapter
type USBIPDynamicServer interface {
usbipNotIncluded()
}
+7
View File
@@ -3,6 +3,8 @@ package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
type V2RayServerTransport interface {
@@ -12,6 +14,11 @@ type V2RayServerTransport interface {
Close() error
}
type V2RayServerTransportHandler interface {
N.TCPConnectionHandlerEx
}
type V2RayClientTransport interface {
DialContext(ctx context.Context) (net.Conn, error)
Close() error
}
+625 -151
View File
@@ -4,171 +4,546 @@ import (
"context"
"fmt"
"io"
"net/http"
"os"
"runtime/debug"
"time"
"github.com/sagernet/sing-box/adapter"
boxCertificate "github.com/sagernet/sing-box/adapter/certificate"
"github.com/sagernet/sing-box/adapter/endpoint"
"github.com/sagernet/sing-box/adapter/inbound"
"github.com/sagernet/sing-box/adapter/outbound"
"github.com/sagernet/sing-box/adapter/provider"
boxService "github.com/sagernet/sing-box/adapter/service"
"github.com/sagernet/sing-box/common/certificate"
"github.com/sagernet/sing-box/common/dialer"
"github.com/sagernet/sing-box/common/httpclient"
"github.com/sagernet/sing-box/common/netns"
"github.com/sagernet/sing-box/common/taskmonitor"
"github.com/sagernet/sing-box/common/tls"
"github.com/sagernet/sing-box/common/trafficcontrol"
"github.com/sagernet/sing-box/common/urltest"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/dns"
"github.com/sagernet/sing-box/experimental"
"github.com/sagernet/sing-box/inbound"
"github.com/sagernet/sing-box/experimental/cachefile"
"github.com/sagernet/sing-box/experimental/deprecated"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-box/outbound"
"github.com/sagernet/sing-box/protocol/direct"
"github.com/sagernet/sing-box/route"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/common/ntp"
"github.com/sagernet/sing/service"
"github.com/sagernet/sing/service/pause"
)
var _ adapter.Service = (*Box)(nil)
var _ adapter.SimpleLifecycle = (*Box)(nil)
type Box struct {
createdAt time.Time
router adapter.Router
inbounds []adapter.Inbound
outbounds []adapter.Outbound
logFactory log.Factory
logger log.ContextLogger
logFile *os.File
clashServer adapter.ClashServer
done chan struct{}
ctx context.Context
createdAt time.Time
debugOptions option.DebugOptions
debugHTTPServer *http.Server
logFactory log.Factory
logger log.ContextLogger
network *route.NetworkManager
endpoint *endpoint.Manager
inbound *inbound.Manager
outbound *outbound.Manager
provider *provider.Manager
service *boxService.Manager
certificateProvider *boxCertificate.Manager
dnsTransport *dns.TransportManager
dnsRouter *dns.Router
connection *route.ConnectionManager
router *route.Router
httpClientService adapter.LifecycleService
internalService []adapter.LifecycleService
done chan struct{}
}
func New(ctx context.Context, options option.Options) (*Box, error) {
createdAt := time.Now()
logOptions := common.PtrValueOrDefault(options.Log)
type Options struct {
option.Options
Context context.Context
PlatformLogWriter log.PlatformWriter
NetworkNamespaceHolderArgs []string
}
func Context(
ctx context.Context,
inboundRegistry adapter.InboundRegistry,
outboundRegistry adapter.OutboundRegistry,
endpointRegistry adapter.EndpointRegistry,
providerRegistry adapter.ProviderRegistry,
dnsTransportRegistry adapter.DNSTransportRegistry,
serviceRegistry adapter.ServiceRegistry,
certificateProviderRegistry adapter.CertificateProviderRegistry,
) context.Context {
if service.FromContext[option.InboundOptionsRegistry](ctx) == nil ||
service.FromContext[adapter.InboundRegistry](ctx) == nil {
ctx = service.ContextWith[option.InboundOptionsRegistry](ctx, inboundRegistry)
ctx = service.ContextWith[adapter.InboundRegistry](ctx, inboundRegistry)
}
if service.FromContext[option.OutboundOptionsRegistry](ctx) == nil ||
service.FromContext[adapter.OutboundRegistry](ctx) == nil {
ctx = service.ContextWith[option.OutboundOptionsRegistry](ctx, outboundRegistry)
ctx = service.ContextWith[adapter.OutboundRegistry](ctx, outboundRegistry)
}
if service.FromContext[option.EndpointOptionsRegistry](ctx) == nil ||
service.FromContext[adapter.EndpointRegistry](ctx) == nil {
ctx = service.ContextWith[option.EndpointOptionsRegistry](ctx, endpointRegistry)
ctx = service.ContextWith[adapter.EndpointRegistry](ctx, endpointRegistry)
}
if service.FromContext[option.ProviderOptionsRegistry](ctx) == nil ||
service.FromContext[adapter.ProviderRegistry](ctx) == nil {
ctx = service.ContextWith[option.ProviderOptionsRegistry](ctx, providerRegistry)
ctx = service.ContextWith[adapter.ProviderRegistry](ctx, providerRegistry)
}
if service.FromContext[adapter.DNSTransportRegistry](ctx) == nil {
ctx = service.ContextWith[option.DNSTransportOptionsRegistry](ctx, dnsTransportRegistry)
ctx = service.ContextWith[adapter.DNSTransportRegistry](ctx, dnsTransportRegistry)
}
if service.FromContext[adapter.ServiceRegistry](ctx) == nil {
ctx = service.ContextWith[option.ServiceOptionsRegistry](ctx, serviceRegistry)
ctx = service.ContextWith[adapter.ServiceRegistry](ctx, serviceRegistry)
}
if service.FromContext[adapter.CertificateProviderRegistry](ctx) == nil {
ctx = service.ContextWith[option.CertificateProviderOptionsRegistry](ctx, certificateProviderRegistry)
ctx = service.ContextWith[adapter.CertificateProviderRegistry](ctx, certificateProviderRegistry)
}
return ctx
}
func New(options Options) (*Box, error) {
createdAt := time.Now()
ctx := options.Context
if ctx == nil {
ctx = context.Background()
}
ctx = service.ContextWithDefaultRegistry(ctx)
endpointRegistry := service.FromContext[adapter.EndpointRegistry](ctx)
inboundRegistry := service.FromContext[adapter.InboundRegistry](ctx)
outboundRegistry := service.FromContext[adapter.OutboundRegistry](ctx)
providerRegistry := service.FromContext[adapter.ProviderRegistry](ctx)
dnsTransportRegistry := service.FromContext[adapter.DNSTransportRegistry](ctx)
serviceRegistry := service.FromContext[adapter.ServiceRegistry](ctx)
certificateProviderRegistry := service.FromContext[adapter.CertificateProviderRegistry](ctx)
if endpointRegistry == nil {
return nil, E.New("missing endpoint registry in context")
}
if inboundRegistry == nil {
return nil, E.New("missing inbound registry in context")
}
if outboundRegistry == nil {
return nil, E.New("missing outbound registry in context")
}
if providerRegistry == nil {
return nil, E.New("missing provider registry in context")
}
if dnsTransportRegistry == nil {
return nil, E.New("missing DNS transport registry in context")
}
if serviceRegistry == nil {
return nil, E.New("missing service registry in context")
}
if certificateProviderRegistry == nil {
return nil, E.New("missing certificate provider registry in context")
}
ctx = pause.WithDefaultManager(ctx)
experimentalOptions := common.PtrValueOrDefault(options.Experimental)
debugOptions := common.PtrValueOrDefault(experimentalOptions.Debug)
err := checkDebugOptions(debugOptions)
if err != nil {
return nil, err
}
var needCacheFile bool
var needClashAPI bool
if options.Experimental != nil && options.Experimental.ClashAPI != nil && options.Experimental.ClashAPI.ExternalController != "" {
var needV2RayAPI bool
if experimentalOptions.CacheFile != nil && experimentalOptions.CacheFile.Enabled || options.PlatformLogWriter != nil {
needCacheFile = true
}
if experimentalOptions.ClashAPI != nil || options.PlatformLogWriter != nil {
needClashAPI = true
}
var logFactory log.Factory
var observableLogFactory log.ObservableFactory
var logFile *os.File
if logOptions.Disabled {
observableLogFactory = log.NewNOPFactory()
logFactory = observableLogFactory
} else {
var logWriter io.Writer
switch logOptions.Output {
case "", "stderr":
logWriter = os.Stderr
case "stdout":
logWriter = os.Stdout
default:
var err error
logFile, err = os.OpenFile(logOptions.Output, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644)
if err != nil {
return nil, err
}
logWriter = logFile
}
logFormatter := log.Formatter{
BaseTime: createdAt,
DisableColors: logOptions.DisableColor || logFile != nil,
DisableTimestamp: !logOptions.Timestamp && logFile != nil,
FullTimestamp: logOptions.Timestamp,
TimestampFormat: "-0700 2006-01-02 15:04:05",
}
if needClashAPI {
observableLogFactory = log.NewObservableFactory(logFormatter, logWriter)
logFactory = observableLogFactory
} else {
logFactory = log.NewFactory(logFormatter, logWriter)
}
if logOptions.Level != "" {
logLevel, err := log.ParseLevel(logOptions.Level)
if err != nil {
return nil, E.Cause(err, "parse log level")
}
logFactory.SetLevel(logLevel)
} else {
logFactory.SetLevel(log.LevelTrace)
}
if experimentalOptions.V2RayAPI != nil && experimentalOptions.V2RayAPI.Listen != "" {
needV2RayAPI = true
}
router, err := route.NewRouter(
ctx,
logFactory.NewLogger("router"),
logFactory.NewLogger("dns"),
common.PtrValueOrDefault(options.Route),
common.PtrValueOrDefault(options.DNS),
options.Inbounds,
)
if experimentalOptions.UnifiedDelay != nil && experimentalOptions.UnifiedDelay.Enabled {
ctx = urltest.ContextWithIsUnifiedDelay(ctx)
}
needAPIService := common.Any(options.Services, func(it option.Service) bool {
return it.Type == C.TypeAPI
})
if service.PtrFromContext[urltest.HistoryStorage](ctx) == nil {
ctx = service.ContextWithPtr(ctx, urltest.NewHistoryStorage())
}
platformInterface := service.FromContext[adapter.PlatformInterface](ctx)
var defaultLogWriter io.Writer
if platformInterface != nil {
defaultLogWriter = io.Discard
}
logFactory, err := log.New(log.Options{
Context: ctx,
Options: common.PtrValueOrDefault(options.Log),
Observable: needClashAPI || needAPIService,
DefaultWriter: defaultLogWriter,
BaseTime: createdAt,
PlatformWriter: options.PlatformLogWriter,
})
if err != nil {
return nil, E.Cause(err, "parse route options")
return nil, E.Cause(err, "create log factory")
}
service.MustRegister[log.Factory](ctx, logFactory)
var internalServices []adapter.LifecycleService
routeOptions := common.PtrValueOrDefault(options.Route)
certificateOptions := common.PtrValueOrDefault(options.Certificate)
if C.IsAndroid || certificateOptions.Store != "" && certificateOptions.Store != C.CertificateStoreSystem ||
len(certificateOptions.Certificate) > 0 ||
len(certificateOptions.CertificatePath) > 0 ||
len(certificateOptions.CertificateDirectoryPath) > 0 {
certificateStore, err := certificate.NewStore(ctx, logFactory.NewLogger("certificate"), certificateOptions)
if err != nil {
return nil, err
}
service.MustRegister[adapter.CertificateStore](ctx, certificateStore)
internalServices = append(internalServices, certificateStore)
}
netnsManager, err := netns.NewManager(logFactory.NewLogger("netns"), options.NetworkNamespaces, options.NetworkNamespaceHolderArgs)
if err != nil {
return nil, err
}
service.MustRegister[adapter.NetworkNamespaceManager](ctx, netnsManager)
internalServices = append(internalServices, netnsManager)
dnsOptions := common.PtrValueOrDefault(options.DNS)
endpointManager := endpoint.NewManager(logFactory.NewLogger("endpoint"), endpointRegistry)
inboundManager := inbound.NewManager(logFactory.NewLogger("inbound"), inboundRegistry, endpointManager)
outboundManager := outbound.NewManager(logFactory.NewLogger("outbound"), outboundRegistry, endpointManager, routeOptions.Final)
providerManager := provider.NewManager(logFactory.NewLogger("provider"), providerRegistry)
dnsTransportManager := dns.NewTransportManager(logFactory.NewLogger("dns/transport"), dnsTransportRegistry, outboundManager, dnsOptions.Final)
serviceManager := boxService.NewManager(logFactory.NewLogger("service"), serviceRegistry)
certificateProviderManager := boxCertificate.NewManager(logFactory.NewLogger("certificate-provider"), certificateProviderRegistry)
service.MustRegister[adapter.EndpointManager](ctx, endpointManager)
service.MustRegister[adapter.InboundManager](ctx, inboundManager)
service.MustRegister[adapter.OutboundManager](ctx, outboundManager)
service.MustRegister[adapter.ProviderManager](ctx, providerManager)
service.MustRegister[adapter.DNSTransportManager](ctx, dnsTransportManager)
service.MustRegister[adapter.ServiceManager](ctx, serviceManager)
service.MustRegister[adapter.CertificateProviderManager](ctx, certificateProviderManager)
dnsRouter, err := dns.NewRouter(ctx, logFactory, dnsOptions)
if err != nil {
return nil, E.Cause(err, "initialize DNS router")
}
service.MustRegister[adapter.DNSRouter](ctx, dnsRouter)
service.MustRegister[adapter.DNSRuleSetUpdateValidator](ctx, dnsRouter)
networkManager, err := route.NewNetworkManager(ctx, logFactory.NewLogger("network"), routeOptions, dnsOptions)
if err != nil {
return nil, E.Cause(err, "initialize network manager")
}
service.MustRegister[adapter.NetworkManager](ctx, networkManager)
connectionManager := route.NewConnectionManager(logFactory.NewLogger("connection"))
service.MustRegister[adapter.ConnectionManager](ctx, connectionManager)
// Must register after ConnectionManager: the Apple HTTP engine's proxy bridge reads it from the context when Manager.Start resolves the default client.
httpClientManager := httpclient.NewManager(ctx, logFactory.NewLogger("httpclient"), options.HTTPClients, routeOptions.DefaultHTTPClient)
service.MustRegister[adapter.HTTPClientManager](ctx, httpClientManager)
httpClientService := adapter.LifecycleService(httpClientManager)
router := route.NewRouter(ctx, logFactory, "router", routeOptions, dnsOptions)
service.MustRegister[adapter.Router](ctx, router)
err = router.Initialize(routeOptions.Rules, routeOptions.RuleSet)
if err != nil {
return nil, E.Cause(err, "initialize router")
}
if needClashAPI || needAPIService {
trafficManager := trafficcontrol.NewManager(outboundManager)
service.MustRegisterPtr(ctx, trafficManager)
router.AppendTracker(trafficManager)
internalServices = append(internalServices, trafficManager)
}
ntpOptions := common.PtrValueOrDefault(options.NTP)
var timeService *tls.TimeServiceWrapper
if ntpOptions.Enabled {
timeService = new(tls.TimeServiceWrapper)
service.MustRegister[ntp.TimeService](ctx, timeService)
}
for i, transportOptions := range dnsOptions.Servers {
var tag string
if transportOptions.Tag != "" {
tag = transportOptions.Tag
} else {
tag = F.ToString(i)
}
err = dnsTransportManager.Create(
ctx,
logFactory.NewLogger(F.ToString("dns/", transportOptions.Type, "[", tag, "]")),
tag,
transportOptions.Type,
transportOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "initialize DNS server[", i, "]")
}
}
err = dnsRouter.Initialize(dnsOptions.Rules)
if err != nil {
return nil, E.Cause(err, "initialize dns router")
}
for i, endpointOptions := range options.Endpoints {
var tag string
if endpointOptions.Tag != "" {
tag = endpointOptions.Tag
} else {
tag = F.ToString(i)
}
endpointCtx := ctx
if tag != "" {
// TODO: remove this
endpointCtx = adapter.WithContext(endpointCtx, &adapter.InboundContext{
Outbound: tag,
})
}
err = endpointManager.Create(
endpointCtx,
router,
logFactory.NewLogger(F.ToString("endpoint/", endpointOptions.Type, "[", tag, "]")),
tag,
endpointOptions.Type,
endpointOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "initialize endpoint[", i, "]")
}
}
inbounds := make([]adapter.Inbound, 0, len(options.Inbounds))
outbounds := make([]adapter.Outbound, 0, len(options.Outbounds))
for i, inboundOptions := range options.Inbounds {
var in adapter.Inbound
var tag string
if inboundOptions.Tag != "" {
tag = inboundOptions.Tag
} else {
tag = F.ToString(i)
}
in, err = inbound.New(
err = inboundManager.Create(
ctx,
router,
logFactory.NewLogger(F.ToString("inbound/", inboundOptions.Type, "[", tag, "]")),
inboundOptions,
tag,
inboundOptions.Type,
inboundOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "parse inbound[", i, "]")
return nil, E.Cause(err, "initialize inbound[", i, "]")
}
}
options.Outbounds = append(options.Outbounds, option.Outbound{
Tag: "Compatible",
Type: C.TypeDirect,
})
for i, serviceOptions := range options.Services {
var tag string
if serviceOptions.Tag != "" {
tag = serviceOptions.Tag
} else {
tag = F.ToString(i)
}
err = serviceManager.Create(
ctx,
logFactory.NewLogger(F.ToString("service/", serviceOptions.Type, "[", tag, "]")),
tag,
serviceOptions.Type,
serviceOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "initialize service[", i, "]")
}
inbounds = append(inbounds, in)
}
for i, outboundOptions := range options.Outbounds {
var out adapter.Outbound
var tag string
if outboundOptions.Tag != "" {
tag = outboundOptions.Tag
} else {
tag = F.ToString(i)
}
out, err = outbound.New(
ctx,
outboundCtx := ctx
if tag != "" {
// TODO: remove this
outboundCtx = adapter.WithContext(outboundCtx, &adapter.InboundContext{
Outbound: tag,
})
}
err = outboundManager.Create(
outboundCtx,
router,
logFactory.NewLogger(F.ToString("outbound/", outboundOptions.Type, "[", tag, "]")),
outboundOptions)
tag,
outboundOptions.Type,
outboundOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "parse outbound[", i, "]")
return nil, E.Cause(err, "initialize outbound[", i, "]")
}
outbounds = append(outbounds, out)
}
err = router.Initialize(outbounds, func() adapter.Outbound {
out, oErr := outbound.New(ctx, router, logFactory.NewLogger("outbound/direct"), option.Outbound{Type: "direct", Tag: "default"})
common.Must(oErr)
outbounds = append(outbounds, out)
return out
for i, providerOptions := range options.Providers {
var tag string
if providerOptions.Tag != "" {
tag = providerOptions.Tag
} else {
tag = F.ToString(i)
}
err = providerManager.Create(
ctx,
router,
logFactory,
tag,
providerOptions.Type,
providerOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "initialize provider[", i, "]")
}
}
for i, certificateProviderOptions := range options.CertificateProviders {
var tag string
if certificateProviderOptions.Tag != "" {
tag = certificateProviderOptions.Tag
} else {
tag = F.ToString(i)
}
err = certificateProviderManager.Create(
ctx,
logFactory.NewLogger(F.ToString("certificate-provider/", certificateProviderOptions.Type, "[", tag, "]")),
tag,
certificateProviderOptions.Type,
certificateProviderOptions.Options,
)
if err != nil {
return nil, E.Cause(err, "initialize certificate provider[", i, "]")
}
}
outboundManager.Initialize(func() (adapter.Outbound, error) {
return direct.NewOutbound(
ctx,
router,
logFactory.NewLogger("outbound/direct"),
"direct",
option.DirectOutboundOptions{},
)
})
if err != nil {
return nil, err
}
var clashServer adapter.ClashServer
if needClashAPI {
clashServer, err = experimental.NewClashServer(router, observableLogFactory, common.PtrValueOrDefault(options.Experimental.ClashAPI))
dnsTransportManager.Initialize(func() (adapter.DNSTransport, error) {
return dnsTransportRegistry.CreateDNSTransport(
ctx,
logFactory.NewLogger("dns/local"),
"local",
C.DNSTypeLocal,
&option.LocalDNSServerOptions{},
)
})
httpClientManager.Initialize(func() (*httpclient.ManagedTransport, error) {
deprecated.Report(ctx, deprecated.OptionImplicitDefaultHTTPClient)
var httpClientOptions option.HTTPClientOptions
httpClientOptions.DefaultOutbound = true
return httpclient.NewTransport(ctx, logFactory.NewLogger("httpclient"), "", httpClientOptions)
})
if platformInterface != nil {
err = platformInterface.Initialize(networkManager)
if err != nil {
return nil, E.Cause(err, "create clash api server")
return nil, E.Cause(err, "initialize platform interface")
}
router.SetTrafficController(clashServer)
}
if needCacheFile {
cacheFile := cachefile.New(ctx, logFactory.NewLogger("cache-file"), common.PtrValueOrDefault(experimentalOptions.CacheFile))
service.MustRegister[adapter.CacheFile](ctx, cacheFile)
internalServices = append(internalServices, cacheFile)
}
if needClashAPI {
clashAPIOptions := common.PtrValueOrDefault(experimentalOptions.ClashAPI)
clashAPIOptions.ModeList = experimental.CalculateClashModeList(options.Options)
clashServer, err := experimental.NewClashServer(ctx, logFactory.(log.ObservableFactory), clashAPIOptions)
if err != nil {
return nil, E.Cause(err, "create clash-server")
}
service.MustRegister[adapter.ClashServer](ctx, clashServer)
internalServices = append(internalServices, clashServer)
}
if needV2RayAPI {
v2rayServer, err := experimental.NewV2RayServer(logFactory.NewLogger("v2ray-api"), common.PtrValueOrDefault(experimentalOptions.V2RayAPI))
if err != nil {
return nil, E.Cause(err, "create v2ray-server")
}
if v2rayServer.StatsService() != nil {
router.AppendTracker(v2rayServer.StatsService())
internalServices = append(internalServices, v2rayServer)
service.MustRegister[adapter.V2RayServer](ctx, v2rayServer)
}
}
if ntpOptions.Enabled {
if ntpOptions.WriteToSystem {
err = adapter.CheckSecurityFeature(ctx, "NTP `write_to_system`")
if err != nil {
return nil, err
}
}
ntpDialer, err := dialer.New(ctx, ntpOptions.DialerOptions, ntpOptions.ServerIsDomain())
if err != nil {
return nil, E.Cause(err, "create NTP service")
}
ntpService := ntp.NewService(ntp.Options{
Context: ctx,
Dialer: ntpDialer,
Logger: logFactory.NewLogger("ntp"),
Server: ntpOptions.ServerOptions.Build(),
Interval: time.Duration(ntpOptions.Interval),
WriteToSystem: ntpOptions.WriteToSystem,
})
timeService.TimeService = ntpService
internalServices = append(internalServices, adapter.NewLifecycleService(ntpService, "ntp service"))
}
return &Box{
router: router,
inbounds: inbounds,
outbounds: outbounds,
createdAt: createdAt,
logFactory: logFactory,
logger: logFactory.NewLogger(""),
logFile: logFile,
clashServer: clashServer,
done: make(chan struct{}),
ctx: ctx,
network: networkManager,
endpoint: endpointManager,
inbound: inboundManager,
outbound: outboundManager,
provider: providerManager,
dnsTransport: dnsTransportManager,
service: serviceManager,
certificateProvider: certificateProviderManager,
dnsRouter: dnsRouter,
connection: connectionManager,
router: router,
httpClientService: httpClientService,
createdAt: createdAt,
debugOptions: debugOptions,
logFactory: logFactory,
logger: logFactory.Logger(),
internalService: internalServices,
done: make(chan struct{}),
}, nil
}
func (s *Box) PreStart() error {
err := s.preStart()
if err != nil {
// TODO: remove catch error
defer func() {
v := recover()
if v != nil {
println(err.Error())
debug.PrintStack()
panic("panic on early close: " + fmt.Sprint(v))
}
}()
s.Close()
return err
}
s.logger.Notice("sing-box pre-started (", F.Seconds(time.Since(s.createdAt).Seconds()), "s)")
return nil
}
func (s *Box) Start() error {
err := s.start()
if err != nil {
@@ -176,54 +551,91 @@ func (s *Box) Start() error {
defer func() {
v := recover()
if v != nil {
log.Error(E.Cause(err, "origin error"))
println(err.Error())
debug.PrintStack()
panic("panic on early close: " + fmt.Sprint(v))
println("panic on early start: " + fmt.Sprint(v))
}
}()
s.Close()
return err
}
return err
s.logger.Notice("sing-box started (", F.Seconds(time.Since(s.createdAt).Seconds()), "s)")
return nil
}
func (s *Box) start() error {
for i, out := range s.outbounds {
if starter, isStarter := out.(common.Starter); isStarter {
err := starter.Start()
if err != nil {
var tag string
if out.Tag() == "" {
tag = F.ToString(i)
} else {
tag = out.Tag()
}
return E.Cause(err, "initialize outbound/", out.Type(), "[", tag, "]")
}
}
func (s *Box) preStart() error {
monitor := taskmonitor.New(s.logger, C.StartTimeout)
monitor.Start("start logger")
err := s.logFactory.Start()
monitor.Finish()
if err != nil {
return E.Cause(err, "start logger")
}
err := s.router.Start()
applyDebugOptions(s.debugOptions)
s.debugHTTPServer, err = startDebugHTTPServer(s.debugOptions)
if err != nil {
return err
}
for i, in := range s.inbounds {
err = in.Start()
if err != nil {
var tag string
if in.Tag() == "" {
tag = F.ToString(i)
} else {
tag = in.Tag()
}
return E.Cause(err, "initialize inbound/", in.Type(), "[", tag, "]")
}
err = adapter.StartNamed(s.ctx, s.logger, adapter.StartStateInitialize, s.internalService) // cache-file clash-api v2ray-api
if err != nil {
return err
}
if s.clashServer != nil {
err = s.clashServer.Start()
if err != nil {
return E.Cause(err, "start clash api server")
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateInitialize, s.network, s.dnsTransport, s.dnsRouter, s.connection, s.router, s.outbound, s.provider, s.inbound, s.endpoint, s.service, s.certificateProvider)
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateStart, s.outbound, s.provider, s.dnsTransport, s.network, s.connection)
if err != nil {
return err
}
err = adapter.StartNamed(s.ctx, s.logger, adapter.StartStateStart, []adapter.LifecycleService{s.httpClientService})
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateStart, s.router, s.dnsRouter)
if err != nil {
return err
}
return nil
}
func (s *Box) start() error {
err := s.preStart()
if err != nil {
return err
}
err = adapter.StartNamed(s.ctx, s.logger, adapter.StartStateStart, s.internalService)
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateStart, s.endpoint)
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateStart, s.certificateProvider)
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateStart, s.inbound, s.service)
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStatePostStart, s.outbound, s.provider, s.network, s.dnsTransport, s.dnsRouter, s.connection, s.router, s.endpoint, s.certificateProvider, s.inbound, s.service)
if err != nil {
return err
}
err = adapter.StartNamed(s.ctx, s.logger, adapter.StartStatePostStart, s.internalService)
if err != nil {
return err
}
err = adapter.Start(s.ctx, s.logger, adapter.StartStateStarted, s.network, s.dnsTransport, s.dnsRouter, s.connection, s.router, s.outbound, s.provider, s.endpoint, s.certificateProvider, s.inbound, s.service)
if err != nil {
return err
}
err = adapter.StartNamed(s.ctx, s.logger, adapter.StartStateStarted, s.internalService)
if err != nil {
return err
}
s.logger.Info("sing-box started (", F.Seconds(time.Since(s.createdAt).Seconds()), "s)")
return nil
}
@@ -234,16 +646,78 @@ func (s *Box) Close() error {
default:
close(s.done)
}
for _, in := range s.inbounds {
in.Close()
var err error
if s.debugHTTPServer != nil {
err = E.Append(err, s.debugHTTPServer.Close(), func(err error) error {
return E.Cause(err, "close debug HTTP server")
})
s.debugHTTPServer = nil
}
for _, out := range s.outbounds {
common.Close(out)
for _, closeItem := range []struct {
name string
service adapter.Lifecycle
}{
{"service", s.service},
{"inbound", s.inbound},
{"certificate-provider", s.certificateProvider},
{"provider", s.provider},
{"endpoint", s.endpoint},
{"outbound", s.outbound},
{"router", s.router},
{"connection", s.connection},
{"dns-router", s.dnsRouter},
{"dns-transport", s.dnsTransport},
{"network", s.network},
} {
done := adapter.LogElapsed(s.logger, "close ", closeItem.name)
err = E.Append(err, closeItem.service.Close(), func(err error) error {
return E.Cause(err, "close ", closeItem.name)
})
done()
}
return common.Close(
s.router,
s.logFactory,
s.clashServer,
common.PtrOrNil(s.logFile),
)
if s.httpClientService != nil {
s.logger.Trace("close ", s.httpClientService.Name())
startTime := time.Now()
err = E.Append(err, s.httpClientService.Close(), func(err error) error {
return E.Cause(err, "close ", s.httpClientService.Name())
})
s.logger.Trace("close ", s.httpClientService.Name(), " completed (", F.Seconds(time.Since(startTime).Seconds()), "s)")
}
for _, lifecycleService := range s.internalService {
done := adapter.LogElapsed(s.logger, "close ", lifecycleService.Name())
err = E.Append(err, lifecycleService.Close(), func(err error) error {
return E.Cause(err, "close ", lifecycleService.Name())
})
done()
}
done := adapter.LogElapsed(s.logger, "close logger")
err = E.Append(err, s.logFactory.Close(), func(err error) error {
return E.Cause(err, "close logger")
})
done()
return err
}
func (s *Box) Network() adapter.NetworkManager {
return s.network
}
func (s *Box) Router() adapter.Router {
return s.router
}
func (s *Box) Inbound() adapter.InboundManager {
return s.inbound
}
func (s *Box) Outbound() adapter.OutboundManager {
return s.outbound
}
func (s *Box) Endpoint() adapter.EndpointManager {
return s.endpoint
}
func (s *Box) LogFactory() log.Factory {
return s.logFactory
}
+1
Submodule clients/android added at eb87216961
Submodule
+1
Submodule clients/apple added at c19945f65b
+1
Submodule clients/desktop added at cebee0d527
+194
View File
@@ -0,0 +1,194 @@
// Command admin_panel_pack post-processes a directory of built SPA
// assets so it can be served straight from the Go binary via //go:embed.
// It does *not* generate any Go source any more — that responsibility
// moved to the embed directive in service/admin_panel/service.go.
//
// Three transformations happen here, all in-place inside the supplied
// directory:
//
// 1. Legacy WOFF (1.0) fallback fonts are deleted. Every browser made
// after 2014 reads WOFF2 natively, so shipping both formats roughly
// doubles the embedded font payload for no real-world benefit. The
// matching `,url(*.woff) format("woff")` segments are stripped from
// the bundled CSS in step (2) so the @font-face rules don't reference
// files that aren't shipped.
// 2. Bundled CSS is rewritten to drop those WOFF URL fragments.
// 3. Compressible text assets (.html, .css, .js, .svg, .json, .map) are
// pre-gzipped as companion `*.gz` files. The HTTP handler then either
// passes those bytes through verbatim with Content-Encoding: gzip or
// falls back to the raw file for the rare client that does not
// advertise gzip support — no on-line compression, no surprises.
// Already-compressed formats (.woff2, fonts, images) are skipped: gzip
// can't shrink them and the duplicate would only inflate the binary.
package main
import (
"bytes"
"compress/gzip"
"flag"
"fmt"
"io/fs"
"os"
"path/filepath"
"regexp"
"strings"
"time"
)
func main() {
dir := flag.String("dir", "service/admin_panel/dist", "directory of built SPA assets to post-process in place")
flag.Parse()
woffDropped, err := pruneWoff(*dir)
if err != nil {
fail("prune woff: %v", err)
}
cssRewritten, err := rewriteCSS(*dir)
if err != nil {
fail("rewrite css: %v", err)
}
stats, err := gzipText(*dir)
if err != nil {
fail("gzip text: %v", err)
}
fmt.Fprintf(os.Stderr, "post-processed %s: dropped %d woff, rewrote %d css, gzipped %d files (%d→%d bytes)\n",
*dir, woffDropped, cssRewritten, stats.gzipped, stats.totalRaw, stats.totalGz)
}
// pruneWoff deletes every legacy *.woff (WOFF 1.0) font under dir. The
// bundled CSS still references them on entry; rewriteCSS drops those
// references in a separate pass so the two operations stay independently
// testable.
func pruneWoff(dir string) (int, error) {
var n int
err := filepath.WalkDir(dir, func(p string, d fs.DirEntry, walkErr error) error {
if walkErr != nil {
return walkErr
}
if d.IsDir() || !strings.EqualFold(filepath.Ext(p), ".woff") {
return nil
}
if err := os.Remove(p); err != nil {
return err
}
n++
return nil
})
return n, err
}
// woffRefAfterRE / woffRefBeforeRE match a single WOFF 1.0 entry inside a
// Vite-bundled CSS `src:` declaration. Vite minifies the rule to
// `src:url(./X.woff2) format("woff2"),url(./X.woff) format("woff");` so the
// "after" regex (the common case) eats the *leading* comma + woff entry,
// leaving only the woff2 source. We also handle the rare reverse ordering
// in a second pass.
var (
woffRefAfterRE = regexp.MustCompile(`,\s*url\([^)]*\.woff\)\s*format\(["']woff["']\)`)
woffRefBeforeRE = regexp.MustCompile(`url\([^)]*\.woff\)\s*format\(["']woff["']\)\s*,\s*`)
)
// rewriteCSS drops every reference to a *.woff URL from every *.css file
// under dir. Pairs naturally with pruneWoff: after both passes, no font
// URL in the bundle points at a file that isn't shipped.
func rewriteCSS(dir string) (int, error) {
var n int
err := filepath.WalkDir(dir, func(p string, d fs.DirEntry, walkErr error) error {
if walkErr != nil {
return walkErr
}
if d.IsDir() || !strings.EqualFold(filepath.Ext(p), ".css") {
return nil
}
data, err := os.ReadFile(p)
if err != nil {
return err
}
out := woffRefAfterRE.ReplaceAll(data, nil)
out = woffRefBeforeRE.ReplaceAll(out, nil)
if bytes.Equal(out, data) {
return nil
}
if err := os.WriteFile(p, out, 0o644); err != nil {
return err
}
n++
return nil
})
return n, err
}
// gzipExts is the set of file extensions for which a `.gz` companion is
// generated. Anything not on this list is left alone — woff2/png/jpeg/etc.
// are already compressed, so gzip can only inflate them slightly while
// doubling the embedded payload.
var gzipExts = map[string]bool{
".html": true,
".css": true,
".js": true,
".mjs": true,
".svg": true,
".json": true,
".map": true,
".txt": true,
".xml": true,
".wasm": true,
}
type gzipStats struct {
gzipped int
totalRaw int64
totalGz int64
}
// gzipText produces a `<file>.gz` companion next to every text-like asset
// in dir, using gzip.BestCompression. The companion is dropped if the
// compressed bytes don't save at least 10 % over the raw file — same
// heuristic we used in the previous (Go-source-emitting) generation, just
// applied to disk files now.
func gzipText(dir string) (gzipStats, error) {
var stats gzipStats
err := filepath.WalkDir(dir, func(p string, d fs.DirEntry, walkErr error) error {
if walkErr != nil {
return walkErr
}
if d.IsDir() {
return nil
}
ext := strings.ToLower(filepath.Ext(p))
if ext == ".gz" || !gzipExts[ext] {
return nil
}
raw, err := os.ReadFile(p)
if err != nil {
return err
}
var buf bytes.Buffer
w, err := gzip.NewWriterLevel(&buf, gzip.BestCompression)
if err != nil {
return err
}
// Reproducible: no mtime, no OS marker.
w.ModTime = time.Time{}
w.OS = 0xff
if _, err := w.Write(raw); err != nil {
return err
}
if err := w.Close(); err != nil {
return err
}
if buf.Len() > len(raw)*9/10 {
return nil
}
stats.gzipped++
stats.totalRaw += int64(len(raw))
stats.totalGz += int64(buf.Len())
return os.WriteFile(p+".gz", buf.Bytes(), 0o644)
})
return stats, err
}
func fail(format string, args ...any) {
fmt.Fprintf(os.Stderr, "admin_panel_pack: "+format+"\n", args...)
os.Exit(1)
}
+468
View File
@@ -0,0 +1,468 @@
package main
import (
"context"
"net/http"
"os"
"strconv"
"strings"
"time"
"github.com/sagernet/asc-go/asc"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
)
func main() {
ctx := context.Background()
switch os.Args[1] {
case "next_project_version":
if len(os.Args) < 3 {
log.Fatal("platform required: ios, macos, or tvos")
}
err := fetchNextProjectVersion(ctx, os.Args[2])
if err != nil {
log.Fatal(err)
}
case "publish_testflight":
err := publishTestflight(ctx)
if err != nil {
log.Fatal(err)
}
case "cancel_app_store":
err := cancelAppStore(ctx, os.Args[2])
if err != nil {
log.Fatal(err)
}
case "prepare_app_store":
err := prepareAppStore(ctx)
if err != nil {
log.Fatal(err)
}
case "publish_app_store":
err := publishAppStore(ctx)
if err != nil {
log.Fatal(err)
}
default:
log.Fatal("unknown action: ", os.Args[1])
}
}
const (
appID = "6785326793"
groupID = "39f9ebdc-05d4-421f-9595-dae71df227c4"
)
func createClient(expireDuration time.Duration) *asc.Client {
privateKey, err := os.ReadFile(os.Getenv("ASC_KEY_PATH"))
if err != nil {
log.Fatal(err)
}
tokenConfig, err := asc.NewTokenConfig(os.Getenv("ASC_KEY_ID"), os.Getenv("ASC_KEY_ISSUER_ID"), expireDuration, privateKey)
if err != nil {
log.Fatal(err)
}
return asc.NewClient(tokenConfig.Client())
}
func fetchNextProjectVersion(ctx context.Context, platformName string) error {
var platform asc.Platform
switch platformName {
case "ios":
platform = asc.PlatformIOS
case "macos":
platform = asc.PlatformMACOS
case "tvos":
platform = asc.PlatformTVOS
default:
return E.New("unknown platform: ", platformName)
}
query := &asc.ListBuildsQuery{
FilterApp: []string{appID},
FilterPreReleaseVersionPlatform: []string{string(platform)},
Limit: 200,
}
if platform != asc.PlatformMACOS {
tagVersion, err := build_shared.ReadTagVersion()
if err != nil {
return err
}
query.FilterPreReleaseVersionVersion = []string{build_shared.TestFlightVersion(tagVersion)}
}
client := createClient(time.Minute)
builds, _, err := client.Builds.ListBuilds(ctx, query)
if err != nil {
return err
}
nextProjectVersion := 1
var projectVersion int
for _, build := range builds.Data {
projectVersion, err = strconv.Atoi(*build.Attributes.Version)
if err != nil {
return E.Cause(err, "parse version code")
}
if projectVersion >= nextProjectVersion {
nextProjectVersion = projectVersion + 1
}
}
os.Stdout.WriteString(F.ToString(nextProjectVersion, "\n"))
return nil
}
func publishTestflight(ctx context.Context) error {
if len(os.Args) < 3 {
return E.New("platform required: ios, macos, or tvos")
}
var platform asc.Platform
switch os.Args[2] {
case "ios":
platform = asc.PlatformIOS
case "macos":
platform = asc.PlatformMACOS
case "tvos":
platform = asc.PlatformTVOS
default:
return E.New("unknown platform: ", os.Args[2])
}
tagVersion, err := build_shared.ReadTagVersion()
if err != nil {
return err
}
tag := tagVersion.VersionString()
releaseNotes := F.ToString("sing-box ", tagVersion.String())
if len(os.Args) >= 4 {
releaseNotes = strings.Join(os.Args[3:], " ")
}
client := createClient(20 * time.Minute)
log.Info(tag, " list build IDs")
buildIDsResponse, _, err := client.TestFlight.ListBuildIDsForBetaGroup(ctx, groupID, nil)
if err != nil {
return err
}
buildIDs := common.Map(buildIDsResponse.Data, func(it asc.RelationshipData) string {
return it.ID
})
waitingForProcess := false
log.Info(string(platform), " list builds")
for {
builds, _, err := client.Builds.ListBuilds(ctx, &asc.ListBuildsQuery{
FilterApp: []string{appID},
FilterPreReleaseVersionPlatform: []string{string(platform)},
})
if err != nil {
return err
}
build := builds.Data[0]
log.Info(string(platform), " ", tag, " found build: ", build.ID, " (", *build.Attributes.Version, ")")
if !waitingForProcess && (common.Contains(buildIDs, build.ID) || time.Since(build.Attributes.UploadedDate.Time) > 30*time.Minute) {
log.Info(string(platform), " ", tag, " waiting for process")
time.Sleep(15 * time.Second)
continue
}
if *build.Attributes.ProcessingState != "VALID" {
waitingForProcess = true
log.Info(string(platform), " ", tag, " waiting for process: ", *build.Attributes.ProcessingState)
time.Sleep(15 * time.Second)
continue
}
log.Info(string(platform), " ", tag, " list localizations")
localizations, _, err := client.TestFlight.ListBetaBuildLocalizationsForBuild(ctx, build.ID, nil)
if err != nil {
return err
}
localization := common.Find(localizations.Data, func(it asc.BetaBuildLocalization) bool {
return *it.Attributes.Locale == "en-US"
})
if localization.ID == "" {
log.Fatal(string(platform), " ", tag, " no en-US localization found")
}
if localization.Attributes == nil || localization.Attributes.WhatsNew == nil || *localization.Attributes.WhatsNew == "" {
log.Info(string(platform), " ", tag, " update localization")
_, _, err = client.TestFlight.UpdateBetaBuildLocalization(ctx, localization.ID, common.Ptr(releaseNotes))
if err != nil {
return err
}
}
log.Info(string(platform), " ", tag, " publish")
response, err := client.TestFlight.AddBuildsToBetaGroup(ctx, groupID, []string{build.ID})
if response != nil && (response.StatusCode == http.StatusUnprocessableEntity || response.StatusCode == http.StatusNotFound) {
log.Info("waiting for process")
time.Sleep(15 * time.Second)
continue
} else if err != nil {
return err
}
log.Info(string(platform), " ", tag, " list submissions")
betaSubmissions, _, err := client.TestFlight.ListBetaAppReviewSubmissions(ctx, &asc.ListBetaAppReviewSubmissionsQuery{
FilterBuild: []string{build.ID},
})
if err != nil {
return err
}
if len(betaSubmissions.Data) == 0 {
log.Info(string(platform), " ", tag, " create submission")
_, _, err = client.TestFlight.CreateBetaAppReviewSubmission(ctx, build.ID)
if err != nil {
if strings.Contains(err.Error(), "ANOTHER_BUILD_IN_REVIEW") {
log.Error(err)
break
}
return err
}
}
break
}
return nil
}
func cancelAppStore(ctx context.Context, platform string) error {
switch platform {
case "ios":
platform = string(asc.PlatformIOS)
case "macos":
platform = string(asc.PlatformMACOS)
case "tvos":
platform = string(asc.PlatformTVOS)
}
tag, err := build_shared.ReadTag()
if err != nil {
return err
}
client := createClient(time.Minute)
for {
log.Info(platform, " list versions")
versions, response, err := client.Apps.ListAppStoreVersionsForApp(ctx, appID, &asc.ListAppStoreVersionsQuery{
FilterPlatform: []string{string(platform)},
})
if isRetryable(response) {
continue
} else if err != nil {
return err
}
version := common.Find(versions.Data, func(it asc.AppStoreVersion) bool {
return *it.Attributes.VersionString == tag
})
if version.ID == "" {
return nil
}
log.Info(platform, " ", tag, " get submission")
submission, response, err := client.Submission.GetAppStoreVersionSubmissionForAppStoreVersion(ctx, version.ID, nil)
if response != nil && response.StatusCode == http.StatusNotFound {
return nil
}
if isRetryable(response) {
continue
} else if err != nil {
return err
}
log.Info(platform, " ", tag, " delete submission")
_, err = client.Submission.DeleteSubmission(ctx, submission.Data.ID)
if err != nil {
return err
}
return nil
}
}
func prepareAppStore(ctx context.Context) error {
tag, err := build_shared.ReadTag()
if err != nil {
return err
}
client := createClient(time.Minute)
for _, platform := range []asc.Platform{
asc.PlatformIOS,
asc.PlatformMACOS,
asc.PlatformTVOS,
} {
log.Info(string(platform), " list versions")
versions, _, err := client.Apps.ListAppStoreVersionsForApp(ctx, appID, &asc.ListAppStoreVersionsQuery{
FilterPlatform: []string{string(platform)},
})
if err != nil {
return err
}
version := common.Find(versions.Data, func(it asc.AppStoreVersion) bool {
return *it.Attributes.VersionString == tag
})
log.Info(string(platform), " ", tag, " list builds")
builds, _, err := client.Builds.ListBuilds(ctx, &asc.ListBuildsQuery{
FilterApp: []string{appID},
FilterPreReleaseVersionPlatform: []string{string(platform)},
})
if err != nil {
return err
}
if len(builds.Data) == 0 {
log.Fatal(string(platform), " ", tag, " no build found")
}
buildID := common.Ptr(builds.Data[0].ID)
if version.ID == "" {
log.Info(string(platform), " ", tag, " create version")
newVersion, _, err := client.Apps.CreateAppStoreVersion(ctx, asc.AppStoreVersionCreateRequestAttributes{
Platform: platform,
VersionString: tag,
}, appID, buildID)
if err != nil {
return err
}
version = newVersion.Data
} else {
log.Info(string(platform), " ", tag, " check build")
currentBuild, response, err := client.Apps.GetBuildIDForAppStoreVersion(ctx, version.ID)
if err != nil {
return err
}
if response.StatusCode != http.StatusOK || currentBuild.Data.ID != *buildID {
switch *version.Attributes.AppStoreState {
case asc.AppStoreVersionStatePrepareForSubmission,
asc.AppStoreVersionStateRejected,
asc.AppStoreVersionStateDeveloperRejected:
case asc.AppStoreVersionStateWaitingForReview,
asc.AppStoreVersionStateInReview,
asc.AppStoreVersionStatePendingDeveloperRelease:
submission, _, err := client.Submission.GetAppStoreVersionSubmissionForAppStoreVersion(ctx, version.ID, nil)
if err != nil {
return err
}
if submission != nil {
log.Info(string(platform), " ", tag, " delete submission")
_, err = client.Submission.DeleteSubmission(ctx, submission.Data.ID)
if err != nil {
return err
}
time.Sleep(5 * time.Second)
}
default:
log.Fatal(string(platform), " ", tag, " unknown state ", string(*version.Attributes.AppStoreState))
}
log.Info(string(platform), " ", tag, " update build")
response, err = client.Apps.UpdateBuildForAppStoreVersion(ctx, version.ID, buildID)
if err != nil {
return err
}
if response.StatusCode != http.StatusNoContent {
response.Write(os.Stderr)
log.Fatal(string(platform), " ", tag, " unexpected response: ", response.Status)
}
} else {
switch *version.Attributes.AppStoreState {
case asc.AppStoreVersionStatePrepareForSubmission,
asc.AppStoreVersionStateRejected,
asc.AppStoreVersionStateDeveloperRejected:
case asc.AppStoreVersionStateWaitingForReview,
asc.AppStoreVersionStateInReview,
asc.AppStoreVersionStatePendingDeveloperRelease:
continue
default:
log.Fatal(string(platform), " ", tag, " unknown state ", string(*version.Attributes.AppStoreState))
}
}
}
log.Info(string(platform), " ", tag, " list localization")
localizations, _, err := client.Apps.ListLocalizationsForAppStoreVersion(ctx, version.ID, nil)
if err != nil {
return err
}
localization := common.Find(localizations.Data, func(it asc.AppStoreVersionLocalization) bool {
return *it.Attributes.Locale == "en-US"
})
if localization.ID == "" {
log.Info(string(platform), " ", tag, " no en-US localization found")
}
if localization.Attributes == nil || localization.Attributes.WhatsNew == nil || *localization.Attributes.WhatsNew == "" {
log.Info(string(platform), " ", tag, " update localization")
_, _, err = client.Apps.UpdateAppStoreVersionLocalization(ctx, localization.ID, &asc.AppStoreVersionLocalizationUpdateRequestAttributes{
PromotionalText: common.Ptr("Yet another distribution for sing-box, the universal proxy platform."),
WhatsNew: common.Ptr(F.ToString("sing-box ", tag, ": Fixes and improvements.")),
})
if err != nil {
return err
}
}
log.Info(string(platform), " ", tag, " create submission")
fixSubmit:
for {
_, response, err := client.Submission.CreateSubmission(ctx, version.ID)
if err != nil {
switch response.StatusCode {
case http.StatusInternalServerError:
continue
default:
return err
}
}
switch response.StatusCode {
case http.StatusCreated:
break fixSubmit
default:
return err
}
}
}
return nil
}
func publishAppStore(ctx context.Context) error {
tag, err := build_shared.ReadTag()
if err != nil {
return err
}
client := createClient(time.Minute)
for _, platform := range []asc.Platform{
asc.PlatformIOS,
asc.PlatformMACOS,
asc.PlatformTVOS,
} {
log.Info(string(platform), " list versions")
versions, _, err := client.Apps.ListAppStoreVersionsForApp(ctx, appID, &asc.ListAppStoreVersionsQuery{
FilterPlatform: []string{string(platform)},
})
if err != nil {
return err
}
version := common.Find(versions.Data, func(it asc.AppStoreVersion) bool {
return *it.Attributes.VersionString == tag
})
switch *version.Attributes.AppStoreState {
case asc.AppStoreVersionStatePrepareForSubmission, asc.AppStoreVersionStateDeveloperRejected:
log.Fatal(string(platform), " ", tag, " not submitted")
case asc.AppStoreVersionStateWaitingForReview,
asc.AppStoreVersionStateInReview:
log.Warn(string(platform), " ", tag, " waiting for review")
continue
case asc.AppStoreVersionStatePendingDeveloperRelease:
default:
log.Fatal(string(platform), " ", tag, " unknown state ", string(*version.Attributes.AppStoreState))
}
_, _, err = client.Publishing.CreatePhasedRelease(ctx, common.Ptr(asc.PhasedReleaseStateComplete), version.ID)
if err != nil {
return err
}
}
return nil
}
func isRetryable(response *asc.Response) bool {
if response == nil {
return false
}
switch response.StatusCode {
case http.StatusInternalServerError, http.StatusUnprocessableEntity:
return true
default:
return false
}
}
+26
View File
@@ -0,0 +1,26 @@
package main
import (
"go/build"
"os"
"os/exec"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/log"
)
func main() {
build_shared.FindSDK()
if os.Getenv("GOPATH") == "" {
os.Setenv("GOPATH", build.Default.GOPATH)
}
command := exec.Command(os.Args[1], os.Args[2:]...)
command.Stdout = os.Stdout
command.Stderr = os.Stderr
err := command.Run()
if err != nil {
log.Fatal(err)
}
}
+236
View File
@@ -0,0 +1,236 @@
package main
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"flag"
"os"
"os/exec"
"path/filepath"
"runtime"
"slices"
"strings"
"github.com/sagernet/sing-box/cmd/internal/build_shared"
"github.com/sagernet/sing-box/common/windivert"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-usbip/driverassets"
E "github.com/sagernet/sing/common/exceptions"
)
var (
debugEnabled bool
outputPath string
target string
)
func init() {
flag.BoolVar(&debugEnabled, "debug", false, "enable debug")
flag.StringVar(&outputPath, "output", "", "output path")
flag.StringVar(&target, "target", runtime.GOOS+"/"+runtime.GOARCH, "target platform")
}
func main() {
flag.Parse()
err := build()
if err != nil {
log.Fatal(err)
}
}
func build() error {
targetParts := strings.Split(target, "/")
if len(targetParts) != 2 || targetParts[0] == "" || targetParts[1] == "" {
return E.New("invalid target: ", target)
}
operatingSystem := targetParts[0]
architecture := targetParts[1]
if outputPath == "" {
outputPath = "sing-box-daemon"
if operatingSystem == "windows" {
outputPath += ".exe"
}
}
absoluteOutputPath, err := filepath.Abs(outputPath)
if err != nil {
return E.Cause(err, "resolve output path")
}
err = os.MkdirAll(filepath.Dir(absoluteOutputPath), 0o755)
if err != nil {
return E.Cause(err, "create output directory")
}
version, err := build_shared.ReadTag()
if err != nil {
return E.Cause(err, "read version")
}
cgoEnabled := operatingSystem != "windows" && os.Getenv("CC") != ""
tags, err := buildTags(operatingSystem, architecture, cgoEnabled)
if err != nil {
return err
}
arguments := []string{
"build",
"-v",
"-trimpath",
"-buildvcs=false",
"-tags", strings.Join(tags, ","),
"-ldflags", build_shared.LinkerFlags(version, debugEnabled),
"-o", absoluteOutputPath,
}
if operatingSystem == "windows" && architecture == "386" {
arguments = append(arguments, "-gcflags=net=-l")
}
arguments = append(arguments, "./experimental/boxdd")
command := exec.Command("go", arguments...)
cgoEnabledValue := "0"
if cgoEnabled {
cgoEnabledValue = "1"
}
command.Env = append(os.Environ(),
"CGO_ENABLED="+cgoEnabledValue,
"GOOS="+operatingSystem,
"GOARCH="+architecture,
"GOTOOLCHAIN=local",
)
command.Stdout = os.Stdout
command.Stderr = os.Stderr
err = command.Run()
if err != nil {
return E.Cause(err, "build sing-box daemon")
}
if operatingSystem == "windows" {
err = stageWinDivertDriver(architecture, filepath.Dir(absoluteOutputPath))
if err != nil {
return err
}
err = stageUSBIPDrivers(architecture, filepath.Dir(absoluteOutputPath))
if err != nil {
return err
}
}
return nil
}
func stageUSBIPDrivers(architecture string, outputDirectory string) error {
driverPackages := []struct {
assets map[string]driverassets.Package
assetDir string
}{
{driverassets.VBoxUSB, filepath.Join("internal", "vboxusb", "assets")},
{driverassets.VHCI, filepath.Join("internal", "usbipvhci", "assets")},
}
var moduleDirectory string
for _, driverPackage := range driverPackages {
staged := driverPackage.assets[architecture]
for _, architecturePackage := range driverPackage.assets {
for _, file := range architecturePackage.Files {
if slices.ContainsFunc(staged.Files, func(stagedFile driverassets.File) bool {
return stagedFile.Name == file.Name
}) {
continue
}
err := os.Remove(filepath.Join(outputDirectory, file.Name))
if err != nil && !os.IsNotExist(err) {
return E.Cause(err, "remove stale ", file.Name)
}
}
}
if len(staged.Files) == 0 {
continue
}
if moduleDirectory == "" {
listOutput, err := exec.Command("go", "list", "-m", "-f", "{{.Dir}}", "github.com/sagernet/sing-usbip").Output()
if err != nil {
return E.Cause(err, "locate sing-usbip module directory")
}
moduleDirectory = strings.TrimSpace(string(listOutput))
}
for _, file := range staged.Files {
content, err := os.ReadFile(filepath.Join(moduleDirectory, driverPackage.assetDir, architecture, file.Name))
if err != nil {
return E.Cause(err, "read ", file.Name)
}
checksum := sha256.Sum256(content)
if hex.EncodeToString(checksum[:]) != file.SHA256 {
return E.New(file.Name, " does not match the digest declared in sing-usbip/driverassets")
}
targetPath := filepath.Join(outputDirectory, file.Name)
stagedContent, err := os.ReadFile(targetPath)
if err == nil && bytes.Equal(stagedContent, content) {
continue
}
err = os.WriteFile(targetPath, content, 0o644)
if err != nil {
return E.Cause(err, "write ", file.Name)
}
}
}
return nil
}
func stageWinDivertDriver(architecture string, outputDirectory string) error {
var assetName, assetDigest string
switch architecture {
case "amd64":
assetName, assetDigest = windivert.Asset64Name, windivert.Asset64SHA256
case "386":
assetName, assetDigest = windivert.Asset32Name, windivert.Asset32SHA256
}
for _, name := range []string{windivert.Asset64Name, windivert.Asset32Name} {
if name == assetName {
continue
}
err := os.Remove(filepath.Join(outputDirectory, name))
if err != nil && !os.IsNotExist(err) {
return E.Cause(err, "remove stale ", name)
}
}
if assetName == "" {
return nil
}
assetDirectory := filepath.Join("common", "windivert", "assets")
content, err := os.ReadFile(filepath.Join(assetDirectory, assetName))
if err != nil {
return E.Cause(err, "read ", assetName)
}
checksum := sha256.Sum256(content)
if hex.EncodeToString(checksum[:]) != assetDigest {
return E.New(assetName, " does not match the digest declared in common/windivert")
}
targetPath := filepath.Join(outputDirectory, assetName)
staged, err := os.ReadFile(targetPath)
if err == nil && bytes.Equal(staged, content) {
return nil
}
err = os.WriteFile(targetPath, content, 0o644)
if err != nil {
return E.Cause(err, "write ", assetName)
}
return nil
}
func buildTags(operatingSystem string, architecture string, cgoEnabled bool) ([]string, error) {
tagsFile := "release/DEFAULT_BUILD_TAGS"
if operatingSystem == "windows" {
if architecture == "386" {
tagsFile = "release/DEFAULT_BUILD_TAGS_OTHERS"
} else {
tagsFile = "release/DEFAULT_BUILD_TAGS_WINDOWS"
}
} else if !cgoEnabled {
tagsFile = "release/DEFAULT_BUILD_TAGS_OTHERS"
}
content, err := os.ReadFile(tagsFile)
if err != nil {
return nil, E.Cause(err, "read build tags")
}
tags := strings.Split(strings.TrimSpace(string(content)), ",")
if operatingSystem == "windows" {
tags = append(tags, "with_external_windivert", "with_external_usbip_drivers")
}
if debugEnabled {
tags = append(tags, "debug")
}
return tags, nil
}

Some files were not shown because too many files have changed in this diff Show More