1397 Commits
Author SHA1 Message Date
Xiaokang Wang (Shelikhoo) 3861a91901 Add wireguard chain proxy support (machine assisted) (#3816) 2026-08-25 18:54:54 +01:00
Xiaokang Wang (Shelikhoo) cbd4d234fe Add iOS Client Support Bundle: Packet Bridge Receiver, Subscription Improvment, DNS and other udp improvement (#3809)
* Improve data url subscription link processing

* consider disk persisted source as added by API and removeable

* feat: add Packet Bridge transport for iOS

* fix(tun): preserve inbound tag for packet encoding

* feat(tun): bypass packet encoding for selected UDP ports

* fix(tun): clean stale stream packetaddr entries

Close packetaddr dispatchers when their read workers terminate so the TUN
sorter removes stale source entries. Make dispatcher close idempotent and
interrupt packet links before taking the reader lock to avoid cleanup
deadlocks. Add regression coverage for stream termination, repeated close,
and recreation of the same source tuple.

* fix lint issue for tun, sub

* fix packet connection adaptor close processing
2026-08-23 16:02:37 +01:00
Xiaokang Wang (Shelikhoo) bd9bdf73fe Add socks5ify engineering command (#3776)
* Add socks5ify engineering command

(Machine assisted.)

* Add quiet and ipv4,ipv6 host, guest flag settings to engineering socks5ify command

(Machine assisted.)

* Fix lint errors

(Machine assisted.)

* fix typo in stun-nat-type-discovery command

* Add support for keep uid for socks5ify, this will make some application that designed to not run as root happy
2026-07-08 22:51:46 +01:00
copilot-swe-agent[bot] ce48e2f9ec Fix staticcheck embedded PacketConn selector usage 2026-07-08 13:25:57 +01:00
Shelikhoo 4ce5839730 Add Stream based Packet Addr for UDP Connections.
(This change is machine assisted.)
2026-07-08 13:25:05 +01:00
bindreams 80d03ba96d common/errors: use expected/actual in tests and trim comments 2026-07-06 23:47:46 +01:00
bindreams 36fd332d3f common/errors: add Unwrap to *Error so errors.Is/As traverse the chain 2026-07-06 23:47:46 +01:00
Shelikhoo f2d7e3a4f1 gdocsviewer: allow adding headers in public config 2026-05-18 18:34:13 +01:00
Xiaokang Wang (Shelikhoo) cbab1db9f7 Add WebRTC Tunnel Support in V2Ray (#3660)
* add webrtc tunnel support in v2ray

* add webrtc tunnel support in v2ray

* add webrtc tunnel support in v2ray

* add webrtc tunnel support in v2ray(fix lint)
2026-04-06 19:43:56 +01:00
Xiaokang Wang (Shelikhoo) d1e2c2391a Add RRPIT - Rapid Reliable Packet Interactive Transport (#3658)
* Add rrpit(unreleased) transport

* rrpit(unreleased) transport: boost reconstruction for the front lane

* rrpit(unreleased) transport: avoid blocking delivery of packets with smux packet reordering

* rrpit(unreleased) transport: add dual channel with differential prioritization

* rrpit(unreleased) transport: add remoteMaxDataShardsPerLane

* rrpit(unreleased) transport: add remoteMaxDataShardsPerLane(fix)

* rrpit(unreleased) transport: add auto-reconnect for transport connection

* rrpit(unreleased) transport: add auto-reconnect for transport connection

* rrpit(unreleased) transport: update tests

* rrpit(unreleased) transport: limit frame size for framed packet write closer

* rrpit(unreleased) transport: remove packet length wrapper

* rrpit(unreleased) transport: update go mod

* rrpit(unreleased) transport: update dtls error propagation

* rrpit(unreleased) transport: update broken tests

* rrpit(unreleased) transport: fix deadlock when closing persistent channel

* rrpit(unreleased) transport: add server disconnection detection for persistent connection

* rrpit(unreleased) transport: fix broken lints

* rrpit(unreleased) transport: fix broken lints

* rrpit(unreleased) transport: fix broken lints

* rrpit(unreleased) transport: fix broken lints

* rrpit(unreleased) transport: fix broken lints
2026-03-31 17:21:48 +01:00
Xiaokang Wang (Shelikhoo) 62a92780cf Add TCP Listener support for wireguard outbound (#3651) 2026-03-14 16:16:00 +00:00
Xiaokang Wang (Shelikhoo) e93e5ac7d9 Better server failure detection and PreserveSourceIPPortWhenDestNATMa… (#3648)
* Better server failure detection and PreserveSourceIPPortWhenDestNATMapping detection

* improve PreserveSourceIPPortWhenDestNATMapping detection
2026-03-10 21:51:40 +00:00
Xiaokang Wang (Shelikhoo) 1f4dc3b375 Stun Nat Type Testing (#3646)
* Add NAT Type Testing utility

* Add dualstack udp support for wireguard outbound

* tidy go.mod

* Do not include stun command on android by default

* fix lints

* add additional test when a secondary server was provided
2026-03-10 17:30:21 +00:00
Shelikhoo 983fe93d51 lint fixup for wireguard 2026-02-20 11:43:33 +00:00
Shelikhoo f516eca541 Add IPv6 happy eyeball support for wireguard
(mostly vibe coded)
2026-02-20 11:43:33 +00:00
Shelikhoo 4c87c9f14f Add Wireguard Support for v2ray
(mostly vibe coded)
2026-02-20 11:43:33 +00:00
Shelikhoo 1960b2f5f0 avoid loop in tlsmirror self-enrollment 2025-11-10 12:33:16 +00:00
Shelikhoo e98ca17d30 Add transient storage lifecycle receiver framework 2025-10-02 16:36:06 +01:00
Shelikhoo ac68bb34da update generated protocol buffer files 2025-07-03 17:52:42 +01:00
Xiaokang Wang (Shelikhoo) b1ef737d48 Add TLSMirror looks like TLS censorship resistant transport protocol as a developer preview transport (#3437)
* Add tlsmirror server processing routine

* Add tlsmirror server processing routine: generated

* Add tlsmirror server handshake capture

* it runs version~

* add draining copy for handshake

* refactor out base tls mirror connection

* tls mirror server side base

* add random field extraction

* add tls like encryption

* add tls like encryption (generated)

* add server side implementation for tlsmirror

* apply coding style: tlsmirror

* fix typo in mirrortls mirror crypto

* add client initial implementation for tls mirror

* add traffic generator implementation for tlsmirror

* add client processing of traffic generator originated traffic

* add embedded traffic generator support to mirrortls client

* override security setting of traffic generator if appropriate

* override security setting of traffic generator if appropriate

* apply request wait time for traffic generator

* add unsafe keyword required for linkname

* fix outbound manager registration for traffic ingress at tlsmirror client

* initial works at sticking packets together

* fix traffic generator's traffic goto logic

* fix get client and server random

* fix applying primary key

* fix log error handling for handshake random retrieval

* fix nonce generation and key derivation logic

* fix: add readPipe channel to client and server connection handlers

* fix: use detached context for persistent mirror TLS dialer

* fix: ensure proper closure of connections on context cancellation

* fix: proper detection of traffic generator originated connection

wait for connection ready before sending payload

* fix coding style
2025-07-03 11:33:16 +01:00
风扇滑翔翼 1f2d76c066 QUIC sniffer: Fix potential slice panic (#3406)
* QUIC sniffer: Fix potential slice panic

* Fix type err

* Update sniff.go

* Add test and fix more

* Refine
2025-05-17 20:53:29 +01:00
Xiaokang Wang (Shelikhoo) c8c1120747 QUIC sniffer restructure (#3360) 2025-03-23 18:16:29 +00:00
Xiaokang Wang (Shelikhoo) 561f31245d A temporary testing fix for the buffer corruption issue (#3331) 2025-02-27 14:32:04 +00:00
Vigilans 3d54bec86a Fix unreleased cache buffer in QUIC sniffing (#3320) 2025-02-20 20:57:11 +00:00
8ceba34970 Correctly implement QUIC sniffer when handling multiple initial packets (#3310)
* Correctly implement QUIC sniffer when handling multiple initial packets

* Only parse token for initial packet

Signed-off-by: Vigilans <vigilans@foxmail.com>

* Update test case for QUIC sniffer

* Fix testcases
* Third packet in `Handshake[2]; packet 1-3` mistakenly copied UDP header into payload, making the payload length 1278 instead of 1250

* Introduce `protocol.ErrProtoNeedMoreData` to allow sniffer to fetch more packets until complete

---------

Signed-off-by: Vigilans <vigilans@foxmail.com>
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: dyhkwong <50692134+dyhkwong@users.noreply.github.com>
2025-02-16 14:11:27 +00:00
Xiaokang Wang (Shelikhoo) 78cd513b82 Add Persistent Storage Support to V2Ray (#3300)
* update protogen to strip unused part

* add persistent storage support

* fix coding style

* update linter setting

* update github integration
2025-02-05 20:36:40 +00:00
Shelikhoo 3ee9045697 chore: regenerate protos 2025-02-02 13:57:34 +00:00
Xiaokang Wang (Shelikhoo) 442581d897 Fixing all the lint errors (#3288)
* Fixing all the lint errors!

* update lint settings
2025-01-22 08:27:48 +00:00
Kasefuchs 6a242d1e2e feat: add jsonpb marshallers (#3165) 2024-10-12 19:26:59 +01:00
Xiaokang Wang (Shelikhoo) 229b30d877 drop unsupported domain address type in packet addr (#3186) 2024-10-12 19:25:59 +01:00
dyhkwong 5ffbc0296c Fix tls.WithDestination ignoring IP address (#3177) 2024-10-12 19:25:21 +01:00
Misaki Kasumi 90edd2e9db Feat: add special handling for /dev/fd address
to support socket activation
2024-09-05 20:55:24 +01:00
dyhkwong 1c103e6179 Fix ss2022 auth reader size overflow 2024-05-05 11:26:31 +01:00
Shelikhoo a40f0c4d11 Add Keep-Alive to removed headers in RemoveHopByHopHeaders 2024-04-28 09:18:08 +01:00
Shelikhoo 5c19d6ebac Fix Registry name detection 2024-03-16 20:23:40 +00:00
Shelikhoo 85b04d1af9 Fix coding style lints 2024-03-15 20:19:18 +00:00
Shelikhoo 04275b6991 Fix unsafe math rand usage 2024-03-15 20:19:18 +00:00
Shelikhoo 353326b432 Allow setting permission on CopyFile helper 2024-03-15 20:18:55 +00:00
Shelikhoo 87affb11a5 Correctly propagate error in AuthenticationReader readBuffer 2024-03-04 19:13:58 +00:00
Shelikhoo cc77e90254 Add subscription manager 2023-11-26 10:55:27 +00:00
Xiaokang Wang (Shelikhoo) b6da3e86a5 Shadowsocks2022 Client Implementation Improvements (#2770)
* Shadowsocks2022 Client Implementation Improvements

1. Added UDP Replay Detection
2. Added UDP Processor State Cache
3. Added More Detailed Output for Time Difference Error
4. Replaced Mutex with RWMutex for reduced lock contention
5. Added per server session tracking of decryption cache and anti-replay window
6. Adjust server session track time
7. Increase per session buffer to 128
8. Fix client crash when EIH is not enabled
9. Fix client log contains non-human-friendly content
10.Remove mark and remove for trackedSessions
11. Fixed packet size uint16 overflow issue
2023-11-24 00:40:07 +00:00
Shelikhoo e575a525bb add shadowsocks2022 tcp client support 2023-11-19 13:16:28 +00:00
Shelikhoo cb84b28de4 Update generated protobuf files to v1.31.0 2023-10-24 19:50:30 +01:00
guangwu 39d2f293c6 chore: remove refs to deprecated io/ioutil (#2717)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-10-16 10:23:50 +08:00
dyhkwong 8de2f27043 fix protocol matching in routing (#2540)
* remove invalid http2 sniffer

* do not set metadata protocol for http inbound

http inbound may have transport settings

* fix doh metadata protocol
2023-09-14 08:27:36 +08:00
AkinoKaede 8c5bcacb99 feat: bulit-in qtls cipher suite implementation 2023-07-17 12:38:25 +08:00
Shelikhoo 0e519b9fb3 implement system network environment 2023-05-30 00:20:34 +01:00
Shelikhoo 69ab87239a add implementation for transport environment and network env 2023-05-29 23:55:43 +01:00
dyhkwong 8433420654 make use of buf.NewWithSize() in Trojan's PacketReader and PacketWriter
also fix a domain length check bug
2023-05-24 00:18:19 +01:00
AkinoKaede 746c45036e Chore: remove Go 1.18 support 2023-04-06 20:10:14 +08:00