Commit graph

172 commits

Author SHA1 Message Date
root 38d5d4d1cf Merge branch 'main' of https://github.com/XTLS/Xray-core into main 2023-11-18 15:25:58 +00:00
Devman 67f4f2e4c1 Merge remote-tracking branch 'upstream/main' 2023-10-05 21:23:19 +00:00
yuhan6665 cf575be678 Fix unwrap tls conn 2023-09-21 15:35:56 -04:00
yuhan6665 585d5ba7c8 Fix Vision reader 2023-09-17 12:56:29 -04:00
yuhan6665 d6d225c698 Refactor Vision reader writer
- Vision now use traffic states to capture two-way info about a connection
- XTLS is de-couple with Vision, it only read traffic states to switch to direct copy mode
- fix a edge case error when Vision unpadding read 5 command bytes
2023-09-13 08:01:34 -04:00
yuhan6665 efd32b0fb2 Enable splice for freedom outbound (downlink only)
- Add outbound name
- Add outbound conn in ctx
- Refactor splice: it can be turn on from all inbounds and outbounds
- Refactor splice: Add splice copy to vless inbound
- Fix http error test
- Add freedom splice toggle via env var
- Populate outbound obj in context
- Use CanSpliceCopy to mark a connection
- Turn off splice by default
2023-09-07 14:17:39 -04:00
douglarek d616f6160d Fix go 1.21 build, see https://github.com/XTLS/Xray-core/issues/2466 2023-08-24 11:17:31 -04:00
cty123 a343d68944 fix(proxy): removed the udp payload length check when encryption is disabled 2023-08-19 23:13:43 -04:00
hax0r31337 f67167bb3b refactor(deps): replace github.com/golang/protobuf with google.golang.org/protobuf 2023-08-10 10:43:27 -04:00
amir-devman e1843be1c8 fix(ip-restriction): protect usrIpRstrct from concurrent access 2023-07-19 23:16:29 +00:00
cty123 b68a43f4fc fix: correct the logic of converting SocksAddr into net.Destination. 2023-07-19 16:01:35 -04:00
cty123 8eb3cfe144 fix: Patch potential nil pointer deference in proxy::http::client::fillRequestHeader(). 2023-07-15 20:17:11 -04:00
RPRX f0f3b417f7
Refactor: Fragmentation
5f5ae37571
9122d0f056
2023-07-06 16:30:39 +00:00
RPRX 6d4194415d
Clean unnecessary code in Trojan 2023-07-06 15:18:05 +00:00
Devman 6a0ff0efce chore(vless): use email instead of id for ip restriction 2023-06-30 21:29:07 +00:00
Devman 343adca4c0 feat(trojan): ip restriction for trojan 2023-06-30 21:28:36 +00:00
Devman 97fa8827e2 feat(vmess): ip restriction for vmess 2023-06-30 21:28:24 +00:00
Devman 3d692eb208 !feat(vless): IP restriction
Beta, only works for vless for now and it's not perfect needs a lot of testing.
2023-06-30 13:13:36 +00:00
Eken Chan 6d8fe7315f XRV should work without rawConn 2023-06-22 10:21:27 -04:00
RPRX ee21763928 Run "go fmt ./..." 2023-06-18 09:46:57 -04:00
RPRX 667279af57 Add "nonIPQuery" to DNS outbound ("drop" by default)
And fixed a memory leak
And regenerated *.pb.go
2023-06-18 09:45:32 -04:00
rrouzbeh 9122d0f056 Add TLS Hello Fragmentation for freedom outbound (#2131)
* Replace TCP Segmentation with TLS Hello Fragmentation

* Update infra/conf/freedom.go

* Refine proxy/freedom/freedom.go

---------

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2023-06-18 09:27:55 -04:00
yuhan6665 9112cfd39c
Clean legacy vmess (#2199)
* Remove legacy Vmess

* validators

* protos
2023-06-12 10:32:25 -04:00
yuhan6665 d11d72be6c Update proto file and fix protoc version parsing
The new protoc cli return version v23.1,
so we parse the file version v4.23.1 without "4."
2023-06-11 13:36:06 -04:00
yuhan6665 c9f517108c Remove mtproto 2023-06-06 23:38:34 -04:00
sambali9 5f5ae37571
Added tcp fragmentation for freedom outbound (#2021)
* Added tcp fragmentation for freedom outbound

* Added TCP_NODELAY to outbound sockopt

* Changed fragment parameters to accept ranges and changed strategy to use length

* Changed packetNumber to packets, supporting range.

* Refactored the freedom fragment logic

* Refine Write()

---------

Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2023-05-22 02:59:58 +00:00
jcdong98 e7324700ed Fix memory leak caused by Wireguard outbound 2023-05-14 20:05:04 -04:00
Zeyu Chen bfd5da2f00 fix: dns empty response 2023-05-01 10:19:50 -04:00
世界 18e5b0963f
Update dependencies 2023-04-23 19:32:07 +08:00
RPRX 242f3b0e0b
XTLS protocol: Apply Vision's padding to XUDP Mux & Minor fixes
It's recommended to enable XUDP Mux when using XTLS Vision
Thank @yuhan6665 for testing
2023-04-16 21:15:36 +00:00
RPRX 4f601530fa
Allow multiple XUDP in Mux when using XTLS Vision (client side) 2023-04-14 22:51:09 +00:00
RPRX b33b0bc89d
Allow multiple XUDP in Mux when using XTLS Vision (server side) 2023-04-12 23:20:38 +08:00
yuhan6665 05d24d6827 Amend XUDP related logs
- Useful for debug XUDP improvements
- Move XUDP log in core log
- Freedom connection log show local port
2023-04-09 13:29:39 -04:00
RPRX be23d5d3b7
XUDP protocol: Add Global ID & UoT Migration
The first UoT protocol that supports UoT Migration
Thank @yuhan6665 for testing
2023-04-06 10:21:35 +00:00
世界 172f353bd7
Update dependencies 2023-03-20 15:01:38 +08:00
世界 55efac7236
Reformat code 2023-03-17 13:17:08 +08:00
世界 f57ec13880
Update UoT protocol 2023-03-17 13:17:08 +08:00
RPRX c04c333afc
They become a part of you 2023-03-04 15:39:27 +00:00
yuhan6665 9e5bc07bf2
Legends never die (#1725) 2023-03-04 10:39:26 +00:00
RPRX 4c8ee0af50
Set reserved to zero after Read()
Thank @IRN-Kawakaze for testing
2023-03-03 15:39:16 +00:00
yuhan6665 25ea69fc3a Fix Vision inserting multiple uuid headers
This happen for stream inbound like http
2023-03-03 09:45:10 -05:00
yuhan6665 a4790133d2 Fix padding extends out of bound again 2023-03-02 21:42:48 -05:00
RPRX ccba465590
Add reserved to WireGuard config
Fixes https://github.com/XTLS/Xray-core/issues/1730
2023-03-02 16:55:42 +00:00
yuhan6665 7b54255cc1 Fix padding extends out of bound 2023-03-01 08:43:00 -05:00
yuhan6665 2d898480be
Vision padding upgrade (#1646)
* Vision server allow multiple blocks of padding

* Fix Vision client to support multiple possible padding blocks

* Vision padding upgrade

- Now we have two types of padding: long (pad to 900-1400) and traditional (0-256)
- Long padding is applied to tls handshakes and first (empty) packet
- Traditional padding is applied to all beginning (7) packets of the connection (counted two-way)
- Since receiver changed its way to unpad buffer in fd6973b3c6, we can freely extend padding packet length easily in the future
- Simplify code

* Adjust receiver withinPaddingBuffers

Now default withinPaddingBuffers = true to give it a chance to do unpadding

* Fix magic numbers for Vision
Thanks @H1JK

Thanks @RPRX for guidance
2023-02-27 22:14:37 -05:00
RPRX c38179a67f
Upgrade github.com/xtls/reality to f34b4d174342
Fixes https://github.com/XTLS/Xray-core/issues/1712
2023-02-26 19:26:57 +08:00
Hellojack 267d93f7bd
Improve ReshapeMultiBuffer (#1636)
* Improve ReshapeMultiBuffer

* Improve again

* Always resize
2023-02-24 11:42:02 -05:00
RPRX 4d2e2b24d3
THE NEXT FUTURE becomes THE REALITY NOW
Thank @yuhan6665 for testing
2023-02-15 16:07:12 +00:00
yuhan6665 c3faa8b7ac
Insert padding with empty content to camouflage VLESS header (#1610)
This only affects the Vision client for protocols expecting server to send data first.
The change is compatible with existing version of Vision server.
2023-02-06 06:45:09 +00:00
RPRX 74416570d4
Format VLESS inbound.go and outbound.go 2023-01-31 18:02:12 +00:00