RPRX
a2b773135a
XHTTP, WS, HU: Forbid "host" in `headers`, read `serverName` instead ( #4142 )
...
WebSocket's config files should be updated ASAP.
2024-12-11 00:58:14 +00:00
zonescape
6ba0dbafd7
Test: Delete temporary file afterwards ( #4028 )
2024-11-20 05:03:39 +00:00
风扇滑翔翼
1ffb8a92cd
Sniff: Prevent crash on QUIC sniffer panic ( #3978 )
...
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2024-11-11 04:20:54 +00:00
zonescape
83bab5dd90
Chore: Run gofmt ( #3990 )
2024-11-09 11:16:11 +00:00
zonescape
71cfea8aae
Chore: Fix some spelling errors ( #3976 )
2024-11-06 10:42:43 -05:00
风扇滑翔翼
057e6284b2
UDS: prevent crash when proxy udp ( #3967 )
...
* net: Prevent nil pointer err in NetAddr()
* Fix dsworker saddr problem
2024-11-04 10:39:04 -05:00
yuhan6665
85a1c33709
API: Add new Get Inbound User ( #3644 )
...
* Add GetInboundUser in proto
* Add get user logic for all existing inbounds
* Add inbounduser command
* Add option to get all users
* Fix shadowsocks2022 config
* Fix init users in shadowsocks2022
* Fix copy
* Add inbound user count command
This api costs much less than get inbound user, could be useful in some case
* Update from latest main
2024-11-03 00:25:23 -04:00
风扇滑翔翼
9f8bb47633
Fix: Apply mutex when visiting Attributes as well ( #3921 )
...
https://github.com/XTLS/Xray-core/pull/3921#issuecomment-2445689462
2024-10-30 02:26:43 +00:00
RPRX
47fad1fbfd
Chore: Generate *.pb.go files with protoc v5.28.2
...
Download https://github.com/protocolbuffers/protobuf/releases/tag/v28.2
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.35.1
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
(Xray-core/) go run ./infra/vprotogen
2024-10-16 04:06:21 +00:00
风扇滑翔翼
86257531ee
Routing: Add mutex for `Attributes` temporarily ( #3908 )
...
https://github.com/XTLS/Xray-core/pull/3908#issuecomment-2412859858
2024-10-15 04:22:32 +00:00
RPRX
c30f5d4796
Lint common/errors/feature_errors.go
2024-10-05 02:15:28 +00:00
Kobe Arthur Scofield
7086d286be
Remove legacy code ( #3838 )
...
* Add feature migration notice
* Remove legacy code of transport processing
* Clear legacy proto field
* Fix missing
* Unify protocolname
* Test remove
* Supressor
* Weird code
* Remove errorgen related comments
2024-09-23 11:28:19 -04:00
Kobe Arthur Scofield
5f0642a671
Errors: Add PrintRemovedFeatureError & PrintDeprecatedFeatureWarning ( #3804 )
2024-09-15 04:55:54 +00:00
Kuzmin Vladimir
d7c5a0fc5f
Fix int overflow on x32 processors causing panic ( #3810 )
...
During the roll, "duration" is converted to int, causing overflow on x32 processors. The value may be very small or negative, causing a panic in rand.Intn.
2024-09-14 23:47:16 -04:00
风扇滑翔翼
781aaee21f
QUIC sniffer: handle multiple initial packets ( #3802 )
...
* QUIC sniffer: handle multiple initial packets
Basically copied from Vigilans/v2ray-core@8f33db0
Co-Authored-By: Vigilans <vigilans@foxmail.com>
* Remove unnecessary file
---------
Co-authored-by: Vigilans <vigilans@foxmail.com>
2024-09-13 13:32:43 -04:00
风扇滑翔翼
88ae774cce
Sniff: Routing “attrs” support non http inbound ( #3808 )
...
* Sniff: Support attrs route in non http inbound
* Add capability to sniff method and path
* Fix test
* Skip HTTP inbound PlainHTTP mode
* Fix test
again
2024-09-13 12:26:36 -04:00
mmmray
3dd3bf94d4
Fix data leak between mux.cool connections ( #3718 )
...
Fix #116
2024-08-25 21:02:01 +02:00
mmmray
2be03c56cb
Pin protobuf packages ( #3715 )
...
* Pin protobuf packages
It happened in the past that I ran with the wrong protobuf version
installed locally, and apparently there is even still some file wrong in
splithttp. Fix this issue once and for all.
* bump protobuf packages
* Revert "bump protobuf packages"
This reverts commit 7a3509346a .
* Revert "Revert "bump protobuf packages""
This reverts commit bb79707d15 .
* fix deprecated grpc usage
2024-08-22 10:18:36 -04:00
curlwget
790f908f0b
chore: fix some comment typos ( #3716 )
...
Signed-off-by: curlwget <curlwget@icloud.com>
2024-08-22 17:32:38 +08:00
RPRX
11b04807b9
Log: Add "from" before source address
...
https://github.com/XTLS/Xray-core/pull/3682#issuecomment-2292600144
2024-08-16 02:18:39 +00:00
yuhan6665
f0547bc04d
Commands: Use creflect.MarshalToJson() as output ( #3674 )
2024-08-12 05:59:23 -05:00
nobody
ac628a9427
API: Improve MarshalToJson() in common/reflect/marshal.go ( #3655 )
...
* Serialize enum to string in MarshalToJson().
* MarshalToJson() respect json tags.
* Add insertTypeInfo parameter to MarshalToJson().
* Omit empty string in MarshalToJson().
* Serialize PortList to string in MarshalToJson().
---------
Co-authored-by: nobody <nobody@nowhere.mars>
2024-08-08 10:35:46 -04:00
风扇滑翔翼
644901d1a5
Socks4a server: Check if the client sends an IP address as domain ( #3628 )
...
Fixes https://github.com/XTLS/Xray-core/issues/3622
2024-08-03 02:08:23 +00:00
lelemka0
4531a7e228
CertificateObject: Enable auto-reload for cacert & Add buildChain & Fixes ( #3607 )
2024-07-29 06:58:58 +00:00
abvf
59819e2a1b
Fix log severity ( #3535 )
2024-07-15 14:04:04 +02:00
MHSanaei
16de0937a8
Fix typos ( #3527 )
2024-07-12 00:20:06 +02:00
yuhan6665
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
RPRX
ca07a705dc
Generate *.pb.go files with protoc v5.27.0
...
Download https://github.com/protocolbuffers/protobuf/releases/tag/v27.0
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
(Xray-core/) go run ./infra/vprotogen
2024-05-26 03:20:53 +00:00
yuhan6665
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
oftenoccur
03c20bf3b4
comments typo
...
Signed-off-by: oftenoccur <ezc5@sina.com>
2024-04-11 17:51:12 +08:00
yuhan6665
657c5c8570
Update HTTPUpgrade spelling and proto
2024-03-20 13:08:43 -04:00
风扇滑翔翼
87ef07d5f4
Correctly propagate error in AuthenticationReader readBuffer
2024-03-04 18:49:16 -05:00
A1lo
a994bf8b04
chore: fix some errors detected by staticcheck ( #3089 )
...
* chore: fix some errors detected by staticcheck
* feat: remove `rand.Seed()` usage for possibly using "fastrand64" runtime to avoid locking
ref: https://pkg.go.dev/math/rand#Seed
2024-03-03 10:52:22 -05:00
yuhan6665
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
Iain Lau
3a99520370
Add PROXY Protocol support for freedom outbound
2024-02-05 10:08:51 -05:00
nobody
961cf9d3b1
Remove slices dependency. ( #2930 )
...
* Remove slices dependency.
* Fix nil pointer dereference bug.
---------
Co-authored-by: nobody <nobody@nowhere.mars>
2024-01-11 10:34:26 -05:00
Lars Lehtonen
2fc4b31fcf
common/singbridge: fix dropped context
2024-01-02 19:56:14 -05:00
nobody
44bb83033f
Add sub-command "-dump" to "run". ( #2854 )
...
* Add MarshalToJson().
* Add cmd arg -dump for printing out merged multiple json configs.
---------
Co-authored-by: nobody <nobody@nowhere.mars>
2023-12-29 11:16:48 -05:00
Lars Lehtonen
06734d6f08
common/ocsp: fix dropped error
2023-12-09 19:52:50 -05:00
yuhan6665
2fd765ea4c
Delay XUDP Basekey read
2023-12-03 22:10:10 -05:00
yuhan6665
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
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
4f05e0ac2b
Unify environment var readers
2023-10-29 15:16:57 -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
dyhkwong
b8bd243df5
Fix buffer.UDP destination override ( #2356 )
2023-08-29 07:12:36 +00:00
mengskysama
fce86aad33
fix(common): strmatcher match domain safety
2023-08-24 11:06:08 -04:00
hax0r31337
f67167bb3b
refactor(deps): replace github.com/golang/protobuf with google.golang.org/protobuf
2023-08-10 10:43:27 -04:00
cty123
b68a43f4fc
fix: correct the logic of converting SocksAddr into net.Destination.
2023-07-19 16:01:35 -04:00
cty123
7aeca33729
fix: revert previous change on IsValid() function; add validation in getUoTConnection();
2023-07-19 15:53:01 -04:00
cty123
2df418abf1
fix: Check if address is nil for IsValid() function.
2023-07-16 20:06:52 -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
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
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
yichya QC
90d915ea05
feat: add tcp_user_timeout
...
```json
{"streamSettings":{"sockopt": {"tcpUserTimeout": 10000}}}
```
run `gofmt -w -s .` as well
2023-04-22 20:41:43 -04:00
Vigilans
039e5f2078
Correctly implement quic sniffer's frame parsing
2023-04-17 11:55:35 -04:00
RPRX
b4c1a56026
XUDP practice: MUST check the flag first & Add more comments
2023-04-16 21:15:27 +00:00
yuhan6665
9f8e9e8e64
Add xudp buffer test
2023-04-15 20:22:10 -04:00
RPRX
b33b0bc89d
Allow multiple XUDP in Mux when using XTLS Vision (server side)
2023-04-12 23:20:38 +08:00
RPRX
01b7e5e9be
XUDP Global ID should be empty if "cone" is disabled (client side)
2023-04-12 23:20:26 +08:00
RPRX
24a2be43ef
Replace "only" with "xudpConcurrency" in Mux config
2023-04-10 10:36:07 +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
76b27a37cb
Update common/xudp/xudp.go and common/mux/server.go
2023-04-07 19:13:20 +08: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
世界
55efac7236
Reformat code
2023-03-17 13:17:08 +08:00
RPRX
00c9576118
Use go:linkname in qtls_go118.go
...
Once and for all, whatever
2023-02-04 21:27:13 +08:00
RPRX
f176ec54ee
v1.7.3
2023-02-02 05:50:21 +00:00
RPRX
b70912799b
Generate *.pb.go files with protoc v3.21.12
...
https://github.com/protocolbuffers/protobuf/releases/tag/v21.12
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
go run ./infra/vprotogen
2023-01-30 04:35:30 +00:00
Hellojack
717518cb5f
Refine the logic of security type AUTO ( #1509 )
2023-01-09 11:14:03 +00:00
RPRX
7b8ff01114
Make sure that 0 <= b.start <= b.end
...
Fixes https://github.com/XTLS/Xray-core/issues/1501
2023-01-09 08:51:51 +00:00
RPRX
ff5ce767df
Revert "add file soft link path resolve support ( #1482 )" ( #1495 )
...
This reverts commit eaf401eda9 .
2023-01-07 15:11:23 +00:00
Nanyu
eaf401eda9
add file soft link path resolve support ( #1482 )
...
* add file soft link path resolve
* add configuration file soft link path resolve support
2023-01-03 10:52:11 -05:00
renahita6
3e4e050313
Fixed a bug that mux.Session could not be properly closed when receiving an End status.
2022-12-10 18:59:51 -05:00
degfw
d3efd2d24f
fix: Replace "math/rand" with "crypto/rand" in padding generation( #2032 ) ( #1337 )
...
Co-authored-by: NaLan ZeYu <nalanzeyu@gmail.com>
2022-11-14 09:24:24 -05:00
yuhan6665
5e695327b1
Add XTLS RPRX's Vision ( #1235 )
...
* Add XTLS RPRX's Vision
* Add helpful warning when security is wrong
* Add XTLS padding (draft)
* Fix number of packet to filter
* Xtls padding version 1.0 and unpadding logic
2022-10-29 00:51:59 -04:00
yuhan6665
8117b66949
Generate all protos
2022-10-10 13:17:32 -04:00
yuhan6665
debd2e3ba8
Remove compatibility code
...
The minimum support go version is already 1.18
2022-09-16 20:39:07 -04:00
Mocking
4140bcd11a
Enhancement of "redirect" function, adding support for MacOS
...
Added the function of "MacOS" FreeBSD firewall traffic forwarding and resolving destination address
example:
"inbounds": [
{
"listen": "127.0.0.1",
"port": 1122,
"protocol": "dokodemo-door",
"tag": "dokodemo",
"settings": {
"network": "tcp",
"followRedirect": true,
"userLevel": 0
},
"streamSettings": {
"sockopt": {
"tproxy": "Redirect"
}
}
}
]
还原#1189 提交
2022-08-22 10:33:58 -04:00
S-Mocking
59602db02d
Add "tproxy" option ( #1189 )
...
* Add "tproxy" option
Added the function of "MacOS" FreeBSD firewall traffic forwarding and resolving destination address
example:
"inbounds": [
{
"listen": "127.0.0.1",
"port": 1122,
"protocol": "dokodemo-door",
"tag": "dokodemo",
"settings": {
"network": "tcp",
"followRedirect": true,
"userLevel": 0
},
"streamSettings": {
"sockopt": {
"tproxy": "pf"
}
}
}
]
* Add "tproxy" option
Added the function of "MacOS" FreeBSD firewall traffic forwarding and resolving destination address
example:
"inbounds": [
{
"listen": "127.0.0.1",
"port": 1122,
"protocol": "dokodemo-door",
"tag": "dokodemo",
"settings": {
"network": "tcp",
"followRedirect": true,
"userLevel": 0
},
"streamSettings": {
"sockopt": {
"tproxy": "pf"
}
}
}
]
* Add "tproxy" option
Added the function of "MacOS" FreeBSD firewall traffic forwarding and resolving destination address
example:
"inbounds": [
{
"listen": "127.0.0.1",
"port": 1122,
"protocol": "dokodemo-door",
"tag": "dokodemo",
"settings": {
"network": "tcp",
"followRedirect": true,
"userLevel": 0
},
"streamSettings": {
"sockopt": {
"tproxy": "pf"
}
}
}
]
Co-authored-by: Mocking <fanhaiwang0817@gmail.com>
2022-08-20 09:02:18 -04:00
世界
c4a307e84d
Refactor to stdlib error unwrap method
2022-06-01 11:03:06 +08:00
世界
398375d76f
Reformat code (quic sniffers)
2022-05-24 06:57:16 +08:00
世界
087f0d1240
Add shadowsocks-2022 inbound/outbound ( #1061 )
2022-05-22 23:55:48 -04:00
yuhan6665
3f64f3206c
Quic sniffer ( #1074 )
...
* Add quic sniffer
* Fix quic sniffer
* Add uTP sniffer
* rename buf pool membership status to unmanaged
* rename buf type adaptor into FromBytes
Co-authored-by: 世界 <i@sekai.icu>
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2022-05-22 23:48:10 -04:00
世界
f046feb9ca
Reformat code
2022-05-18 15:29:01 +08:00
Mustafa
42284a757c
chore fixed ( #921 )
...
* chore fixed
2022-02-02 19:57:32 -05:00
Machtergreifung
9ad26fa049
chore fixed ( #897 )
...
* chore fixed
2022-01-12 21:51:47 -05:00
yuhan6665
9ea1bf7c1d
Fix shadowsocks xchacha cipher nonce size
2021-12-19 21:18:35 -05:00
yuhan6665
dd9da23a59
Add statistics in conn testing
...
Occasional error is observed when we execute long test
Print time and memory for better troubleshooting in the future
Co-authored-by: Jebbs <qjebbs@gmail.com>
2021-12-14 20:15:05 -05:00
yuhan6665
e93da4bd02
Fix some tests and format code ( #830 )
...
* Increase some tls test timeout
* Fix TestUserValidator
* Change all tests to VMessAEAD
Old VMess MD5 tests will be rejected and fail in 2022
* Chore: auto format code
2021-12-14 19:28:47 -05:00
yuhan6665
d5a7901601
Unified drain support for vmess and shadowsocks ( #791 )
...
* Added test for no terminate signal
* unified drain support for vmess and shadowsockets
* drain: add generated file
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-12-14 19:27:31 -05:00
Shelikhoo
ff35118af5
VMess AEAD based packet length
...
(cherry picked from commit 08221600082a79376bdc262f2ffec1a3129ae98d)
2021-10-22 18:34:57 +08:00
世界
5c366db847
Add observatory / latestPing balancing strategy
...
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-22 17:16:20 +08:00
maskedeken
238bd5d050
Add xchacha20-ietf-poly1305 for Shadowsocks
2021-10-22 13:24:29 +08:00
yuhan6665
45dc97e2b6
Use shadowsocket's bloomring for shadowsocket's replay protection ( #764 )
...
* use shadowsocket's bloomring for shadowsocket's replay protection
* added shadowsockets iv check for tcp socket
* Rename to shadowsockets iv check
* shadowsocks iv check config file
* iv check should proceed after decryption
* use shadowsocket's bloomring for shadowsocket's replay protection
* Chore: format code (#842 )
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-22 12:38:40 +08:00
世界
50e576081e
Add DispatchLink
2021-10-22 12:38:40 +08:00
世界
a3023e43ef
Add routeOnly sniffing option
2021-10-22 11:57:23 +08:00
yuhan6665
e286cdcaa8
Style: format code by gofumpt ( #761 )
2021-10-20 00:57:14 +08:00
yuhan6665
d77be80b40
Refinement: LRU ( #1142 ) ( #775 )
...
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-20 00:53:29 +08:00