Commit Graph

138 Commits

Author SHA1 Message Date
hax0r31337
f67167bb3b refactor(deps): replace github.com/golang/protobuf with google.golang.org/protobuf 2023-08-10 10:43:27 -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
RPRX
4f8f49024b
Fix xray_test.go 2023-06-19 01:07:19 +00:00
RPRX
a9ed1a03aa
Fix dns_proxy_test.go 2023-06-19 00:51:03 +00:00
RPRX
253a422467
Fix "nonIPQuery" 2023-06-19 00:33:59 +00: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
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
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
xqzr
dd81ad5342
Add tcpMaxSeg to sockopt (#2002) 2023-04-30 00:03:30 +00: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
RPRX
06c9e50c52
Add "xudpProxyUDP443" to Mux config & XUDP rejects UDP/443 traffic by default (client side, excluding reverse proxy) 2023-04-14 22:51:18 +00:00
RPRX
24a2be43ef
Replace "only" with "xudpConcurrency" in Mux config 2023-04-10 10:36:07 +08:00
RPRX
29d7865d78
Refine "only" in Mux config 2023-04-10 10:15:16 +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
RPRX
a0d06f3a97 Add env support to "address", "listen", etc.
Usage: `"address": "env:ADDR"`, `"listen": "env:AUDS"`...
Just like existing `"port": "env:PORT"`
2023-03-26 10:10:27 +00:00
Hirbod Behnam
6872be5cc3 Add user agent to gRPC (#1790) 2023-03-26 09:23:42 +03:30
世界
55efac7236
Reformat code 2023-03-17 13:17:08 +08:00
世界
f57ec13880
Update UoT protocol 2023-03-17 13:17:08 +08:00
xqzr
c3322294be
Add tcpWindowClamp to sockopt (#1757)
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
2023-03-09 13:51:16 +00: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
ccba465590
Add reserved to WireGuard config
Fixes https://github.com/XTLS/Xray-core/issues/1730
2023-03-02 16:55:42 +00:00
RPRX
55dc26f228
Add REALITY support to gRPC client and server
Now you are able to configure REALITY gRPC client and server
Duplicate of REALITY H2, perhaps, just for fun
2023-02-27 19:52:01 +00:00
sduoduo233
336b2daeb9
DNS Header for KCP (#1672)
* dns header

* fixed domain name encoding for dns header

---------

Co-authored-by: kerry <lvhaiyangkerry@gmail.com>
2023-02-24 12:06:24 -05:00
xqzr
c8b4580869
add V6Only (#1677)
* add `V6Only`

* add `V6Only`
2023-02-24 11:54:40 -05:00
Yue Yin
03b8c094de Support SPKI Fingerprint Pinning
Support SPKI Fingerprint Pinning for TLSObject
2023-02-24 11:47:00 -05:00
RPRX
9d3de59d3f
Check "serverNames" and "shortIds" (client side)
Prevents https://github.com/XTLS/Xray-core/issues/1675
2023-02-21 13:43:13 +00:00
RPRX
c7358a32f5
Allow empty "spiderX" (client side) 2023-02-17 21:07:27 +08:00
RPRX
e1cd1fd33e
Allow empty "shortId" (client side) 2023-02-17 12:39:18 +00:00
RPRX
4d2e2b24d3
THE NEXT FUTURE becomes THE REALITY NOW
Thank @yuhan6665 for testing
2023-02-15 16:07:12 +00:00
RPRX
fa7300e910
Add warning on using old version of XTLS
And checks param `fingerprint` also
2023-02-03 23:29:46 +08:00
RPRX
dc72cf2c78
Refine fingerprints
Fixes https://github.com/XTLS/Xray-core/issues/1577
2023-02-01 12:58:17 +00:00
aeeq
620eb63c1b Add sockopt interface setting for binding outbound to a particular device like "eth0" (#1494)
* Update sockopt_linux.go

add Interface Name

* Update config.pb.go

add Interface Name

* Update transport_internet.go

add Interface Name

* Update config.pb.go

* update config.proto add interface

* Update config.pb.go
2023-01-09 09:45:30 -05: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
yuhan6665
c4fbdf1b78 Run core/format.go 2022-12-25 19:47:53 -05:00
PMExtra
c9b6fc0104 Add custom header support for HTTP proxy 2022-12-18 21:48:23 -05:00
yuhan6665
2e30093ffd Enforce specific none flow for xtls vision
In the past, when user open xtls vision on the server side, plain vless+tls can connect.
Pure tls is known to have certain tls in tls characters.
Now  server need to specify "xtls-rprx-vision,none" for it be able usable on the same port.
2022-12-04 23:15:36 -05:00
nanoda0523
e18b52a5df
Implement WireGuard protocol as outbound (client) (#1344)
* implement WireGuard protocol for Outbound

* upload license

* fix build for openbsd & dragonfly os

* updated wireguard-go

* fix up

* switch to another wireguard fork

* fix

* switch to upstream

* open connection through internet.Dialer (#1)

* use internet.Dialer

* maybe better code

* fix

* real fix

Co-authored-by: nanoda0523 <nanoda0523@users.noreply.github.com>

* fix bugs & add ability to recover during connection reset on UDP over TCP parent protocols

* improve performance

improve performance

* dns lookup endpoint && remove unused code

* interface address fallback

* better code && add config test case

Co-authored-by: nanoda0523 <nanoda0523@users.noreply.github.com>
2022-11-21 20:05:54 -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
xqzr
8cf23f1947
add tcpcongestion (#1234)
* add `tcpcongestion`

* Update sockopt_linux.go

* Update config.pb.go

* Update transport_internet.go

* Update config.pb.go

* Update transport_internet.go

* Update config.proto
2022-10-10 13:13:50 -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