Commit Graph
100 Commits
Author SHA1 Message Date
yuhan6665 b0272c172a README.md: Add wulabing/xray_docker to Docker 2024-10-16 23:20:11 -04:00
6a70ae6408 HTTP transport: Fix an issue when HTTP client start fail with 403 (#3910)
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2024-10-15 02:55:48 +00:00
yuhan6665andGitHub 3632e83faa Transport: Add HTTP3 to HTTP (#3819) 2024-09-26 01:29:41 +00:00
yuhan6665andGitHub 592c2daf58 Update go 1.23 (#3730) 2024-08-25 22:30:38 -04:00
yuhan6665andmmmray f0547bc04d Commands: Use creflect.MarshalToJson() as output (#3674) 2024-08-12 05:59:23 -05:00
yuhan6665andGitHub a342db3e28 Fix a nil pointer in Wireguard client logging (#3608) 2024-07-29 06:43:46 +00:00
yuhan6665 4cb2a128db Don't do raw/splice copy in case of MITM 2024-07-24 20:41:40 -04:00
02cd3b8c74 Fix SplitHTTP race condition when creating new sessions (#3533)
Co-authored-by: nobody <nobody@nowhere.mars>
Co-authored-by: mmmray <142015632+mmmray@users.noreply.github.com>
2024-07-17 11:41:17 +00:00
yuhan6665 b8c0768b16 Properly parse HTTP host for verification
Also fix H2 transport to not verify if host is not defined
2024-07-07 22:35:11 -04:00
yuhan6665 4c51636788 Relax server HTTP host check 2024-07-06 15:06:58 -04:00
yuhan6665 60b2c349d2 Try to fix infinite conn read in tests 2024-07-01 23:55:30 -04:00
yuhan6665andGitHub 079d0bd8a9 Refactor log (#3446)
* Refactor log

* Add new log methods

* Fix logger test

* Change all logging code

* Clean up pathObj

* Rebase to latest main

* Remove invoking method name after the dot
2024-06-29 14:32:57 -04:00
yuhan6665 075051a693 Add wireguard test 2024-06-01 19:34:31 -04:00
yuhan6665 bbf25b14d9 Update dependencies 2024-06-01 11:56:24 -04:00
yuhan6665 0a3c449cdf Inbound worker should fill context outbounds info
https://github.com/XTLS/Xray-core/issues/3388
2024-05-26 12:25:25 -04:00
yuhan6665 9b6141b83f Wireguard dial with context 2024-05-22 09:02:20 -04:00
yuhan6665 121eb7b4fc Splice update timer to 8 hours for inbound timer 2024-05-19 23:56:42 -04:00
yuhan6665 3168d27b0b Splice update timer to 8 hours 2024-05-18 11:57:11 -04:00
yuhan6665 1d450cfbd2 Fix nil in inbound handler 2024-05-14 21:42:40 -04:00
yuhan6665andGitHub 017f53b5fc Add session context outbounds as slice (#3356)
* Add session context outbounds as slice

slice is needed for dialer proxy where two outbounds work on top of each other
There are two sets of target addr for example
It also enable Xtls to correctly do splice copy by checking both outbounds are ready to do direct copy

* Fill outbound tag info

* Splice now checks capalibility from all outbounds

* Fix unit tests
2024-05-13 21:52:24 -04:00
yuhan6665andMark Ma 84eeb56ae4 Select alive only node when fallbackTag is given
- Apply to random and roundrobin strategy
- Require observatory config

Co-authored-by: Mark Ma <38940419+mkmark@users.noreply.github.com>
2024-05-05 10:11:29 -04:00
yuhan6665 b356b35312 Update latest compatible gvisor
https://deps.dev/go/gvisor.dev%2Fgvisor/
2024-04-21 11:48:04 -04:00
yuhan6665 32f0017449 Add error log for ws host and path check 2024-04-17 21:31:57 -04:00
yuhan6665 548646fb06 Fix an edge case with tls hello fragment 2024-04-04 02:50:34 -04:00
yuhan6665andRPRX 7e3a8d3a04 Add separate host config for websocket 2024-03-30 07:43:05 +00:00
yuhan6665andRPRX e2302b421c Update proto file for websocket and httpupgrade (breaking) 2024-03-30 07:42:41 +00:00
yuhan6665 657c5c8570 Update HTTPUpgrade spelling and proto 2024-03-20 13:08:43 -04:00
yuhan6665 69e1734e3a Apply FallbackTag to leastping and roundrobin 2024-03-15 14:49:31 -04:00
yuhan6665 37f8654957 Update 1.8.9 and dependencies 2024-03-10 15:48:50 -04:00
yuhan6665 9b5c3f417e Fix user download stats with splice 2024-03-09 23:40:42 -05:00
yuhan6665 601246468a Add initial check for burstObserver 2024-03-05 23:21:03 -05:00
aa101d9dc2 Doq (#3073)
* feat: change ALPN of DNS over QUIC

* Fix: length of DNS over QUIC (#1888)

---------

Co-authored-by: 秋のかえで <autmaple@protonmail.com>
2024-02-28 21:35:35 -05:00
yuhan6665 1c8375997d Update 1.8.8 and dependencies 2024-02-25 09:31:59 -05:00
yuhan6665 57f0a6712f Revert "Fix a little version issue"
This reverts commit c100d35b88.
2024-02-21 17:40:27 -05:00
yuhan6665 3778a367c8 Fix and simplify SockOpt in UDP
https://github.com/golang/go/issues/29277
2024-02-21 13:59:09 -05:00
yuhan6665andqwerr0 a0f1e1f377 FakeDNS return TTL=1 and drop HTTPS QType 65 request
Co-authored-by: qwerr0
2024-02-21 11:09:51 -05:00
fa5d7a255b Least load balancer (#2999)
* v5: Health Check & LeastLoad Strategy (rebased from 2c5a71490368500a982018a74a6d519c7e121816)

Some changes will be necessary to integrate it into V2Ray

* Update proto

* parse duration conf with time.Parse()

* moving health ping to observatory as a standalone component

* moving health ping to observatory as a standalone component: auto generated file

* add initialization for health ping

* incorporate changes in router implementation

* support principle target output

* add v4 json support for BurstObservatory & fix balancer reference

* update API command

* remove cancelled API

* return zero length value when observer is not found

* remove duplicated targeted dispatch

* adjust test with updated structure

* bug fix for observer

* fix strategy selector

* fix strategy least load

* Fix ticker usage

ticker.Close does not close ticker.C

* feat: Replace default Health Ping URL to HTTPS (#1991)

* fix selectLeastLoad() returns wrong number of nodes (#2083)

* Test: fix leastload strategy unit test

* fix(router): panic caused by concurrent map read and write (#2678)

* Clean up code

---------

Co-authored-by: Jebbs <qjebbs@gmail.com>
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: 世界 <i@sekai.icu>
Co-authored-by: Bernd Eichelberger <46166740+4-FLOSS-Free-Libre-Open-Source-Software@users.noreply.github.com>
Co-authored-by: 秋のかえで <autmaple@protonmail.com>
Co-authored-by: Rinka <kujourinka@gmail.com>
2024-02-17 22:51:37 -05:00
yuhan6665 bf02392969 Temporarily turn off sockopt for UDP on windows 2024-02-17 13:22:39 -05:00
yuhan6665 a15334b395 Go back to first fix (revet d21e9b0abd)
Xtls is magic, don't play with it ;)

A knowledged guess is the timing to switch to splice is very sensitive. Now both Xtls and Freedom outound do the switching when pipe just finished one buffer
2024-02-17 11:16:37 -05:00
yuhan6665 09656bd5d1 Add back sleep for freedom splice 2024-02-15 21:18:56 -05:00
yuhan6665 d83ccaeea9 Clean up legacy compile directive 2024-02-06 21:17:21 -05:00
yuhan6665 d21e9b0abd Try a better fix for rare ssl error with freedom splice
It seems the root cause is if the flag set at the inbound pipe reader, it is a race condition and freedom outbound can possibly do splice at the same time with inbound xtls writer.
Now we set the flag at the earliest and always do splice at the next buffer cycle.
2024-01-26 04:42:45 -05:00
yuhan6665 3167a70ff8 Try to fix rare ssl error with freedom splice 2024-01-26 02:29:26 -05:00
yuhan6665 10255bca83 Reduce size and time of KCP test 2024-01-15 10:37:56 -05:00
yuhan6665 77376ed94f Reduce size and time of UDP test
In the past, the UDP test in mass parallel proved to be the source of instability. This change try to improve pass rate.
2024-01-12 22:09:04 -05:00
yuhan6665 3f0bc13429 Update 1.8.7 and dependencies 2024-01-07 15:19:18 -05:00
yuhan6665 eacdda3c93 Fix connecting to quic outbound with domain address 2023-12-25 22:25:22 -05:00
yuhan6665 d60281d0a5 Add DestIpAddress() in Dialer interface
Android client prepares an IP before proxy connection is established. It is useful when connecting to wireguard (or quic) outbound with domain address. E.g. engage.cloudflareclient.com:2408
2023-12-18 18:36:56 -05:00
yuhan6665 2fd765ea4c Delay XUDP Basekey read 2023-12-03 22:10:10 -05:00
yuhan6665andGitHub 6f092bd212 Add "masterKeyLog" in TLS config (#2758)
* Add "enableMasterKeyLog" in TLS config

Turn on the debug option for Wireshark to decrypt traffic

* Change to "masterKeyLog" to configure a path
2023-11-27 10:08:34 -05:00
yuhan6665 2570855cd7 Update v1.8.6 2023-11-17 20:11:40 -05:00
yuhan6665 ac52a226d1 v1.8.5 2023-11-12 16:57:15 -05:00
yuhan6665 7205298474 Update dependencies 2023-11-12 16:32:28 -05:00
7523f7f440 统一 domainStrategy 行为. (#2720)
* 统一 `domainStrategy` 行为.

* Update proto

---------

Co-authored-by: rui0572 <125641819+rui0572@users.noreply.github.com>
2023-11-12 16:37:02 -05:00
d9fd3f8eb1 Freedom xdomain strategy (#2719)
* 统一 `domainStrategy` 行为.

* aliases NG.

* 化简.

* 调整.

* Let it crash.

* Update proto

---------

Co-authored-by: rui0572 <125641819+rui0572@users.noreply.github.com>
2023-11-12 16:27:39 -05:00
a109389efb Wireguard resolve strategy (#2717)
* 增加 wireguard 出站选项 `resolveStrategy`.

* They become a part of you.

* 移除不必要的选项别名.

* aliases NG.

* 微调.

---------

Co-authored-by: rui0572 <125641819+rui0572@users.noreply.github.com>
2023-11-12 15:52:09 -05:00
yuhan6665 cc4b28b159 Remove dragonfly build 2023-11-12 14:30:50 -05:00
5ae3791a8e feat : upgrade wireguard go sdk (#2716)
Co-authored-by: kunson <kunson@kunsondeMacBook-Pro-3.local>
Co-authored-by: 世界 <i@sekai.icu>
2023-11-12 15:10:01 -05:00
yuhan6665 d24a636c75 Move some log from stdout to ray log 2023-10-28 21:31:54 -04:00
yuhan6665 11b61b02c8 Refine environment var
Address some review comments
2023-10-28 18:22:44 -04:00
yuhan6665 999bdc58d3 Turn on freedom splice by default 2023-10-29 15:16:57 -04:00
yuhan6665 4f05e0ac2b Unify environment var readers 2023-10-29 15:16:57 -04:00
yuhan6665 291061e9da Fix an edge case reshaping buffer too long 2023-10-21 03:20:51 -04:00
yuhan6665 e244db76fb Update all dependencies 2023-09-29 23:06:15 -04:00
yuhan6665 772936906a Add reality test 2023-09-29 22:30:50 -04: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
yuhan6665 ae2fa30e01 Add Vless tests 2023-09-07 09:38:33 -04:00
yuhan6665 229851f621 Revert "Docker build use 1.20 go"
This reverts commit cd1d000860.
2023-08-24 11:13:12 -04:00
yuhan6665 cd1d000860 Docker build use 1.20 go 2023-08-22 21:28:02 -04:00
yuhan6665andGitHub a6c5c57930 Support regex matching with attr (#2258)
* Support regex matching with attr

* Add test case

* Optimizing regex parsing at core start

* simpliy
2023-06-27 08:04:09 +00:00
yuhan6665andGitHub 9112cfd39c Clean legacy vmess (#2199)
* Remove legacy Vmess

* validators

* protos
2023-06-12 10:32:25 -04:00
yuhan6665 bf4b1fab3c Simplify http attrabute matching
In the past, we use Starlark script, it is over engineered and barely used.
By switching to simple key value string contains logic we can reduce core size about 0.7MB
2023-06-12 10:25:45 -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
yuhan6665 a4e80f01e4 Add tls serverName to DoQ 2023-06-04 08:45:38 -04:00
yuhan6665andGitHub c80646a045 Clean code dependencies on github.com/miekg/dns (#2099) 2023-05-21 03:40:56 +00:00
yuhan6665andGitHub ae518cce52 Update docker.yml
limit docker build to main branch
2023-04-29 23:05:53 -04:00
yuhan6665 197bc78ea1 Turn off Quic qlog since it jam the regular test info 2023-04-17 11:56:55 -04:00
yuhan6665 9f8e9e8e64 Add xudp buffer test 2023-04-15 20:22:10 -04: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
yuhan6665andGitHub 9e5bc07bf2 Legends never die (#1725) 2023-03-04 10:39:26 +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
yuhan6665 7b54255cc1 Fix padding extends out of bound 2023-03-01 08:43:00 -05:00
yuhan6665andGitHub 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
yuhan6665 a5b297f968 Update test.yml
Fix an issue when geoip fails download but geosite is ok
https://github.com/XTLS/Xray-core/actions/runs/4264609454/jobs/7422911731
2023-02-24 12:41:27 -05:00
yuhan6665 9e07d8304d Add retry for test steps to download geofiles 2023-02-21 22:36:36 -05:00
yuhan6665andGitHub 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
yuhan6665andGitHub 15bb23e4ec XTLS Vision rejects Mux except for XUDP (#1567)
* Xtls vision reject vless-tcp-tls+Mux

* Address review comment
2023-01-28 05:39:36 +00:00
yuhan6665andGitHub fb212905bd XTLS Vision checks outer TLS version (#1554) 2023-01-27 03:43:58 +00:00
yuhan6665andGitHub 3fb67f065a Add fingerprint xray_random (#1540)
* Add fingerprint xray_random

xray_random means to pick a random uTLS fingerprint at the core startup
This way, the fingerprint is stable for a user for some days. While there is no identifiable signature for the whole xray community

* Fingerprint "random" refine

Exclude old fingerprint from RNG
2023-01-20 23:36:08 -05:00
yuhan6665 32ce7cd730 Add new uTLS fingerprints
- correct safari
- new format is the variable name in https://github.com/refraction-networking/utls/blob/master/u_common.go#L163
- notable ones "HelloChrome_106_Shuffle", "Hello360_Auto", "HelloQQ_Auto"
2023-01-09 09:19:53 -05:00
yuhan6665 9bc1564b0a Update v1.7.1 and dependencies 2023-01-06 21:10:47 -05:00
yuhan6665 3db7d44fc2 Update v1.7.0 and denpendencies 2022-12-25 19:47:53 -05:00
yuhan6665 c4fbdf1b78 Run core/format.go 2022-12-25 19:47:53 -05:00
yuhan6665 48a75fc340 Add retry for release steps to download geofiles 2022-12-18 21:16:53 -05:00
yuhan6665 f35ded79ad Vision only reject TCP command for VLESS-TCP-TLS
UDP and MUX command currently has no flow value.
Also the character is the same with or without XTLS
2022-12-12 21:20:01 -05:00