Commit Graph

271 Commits

Author SHA1 Message Date
Shelikhoo 778876df9e
VMess AEAD based packet length
(cherry picked from commit 08221600082a79376bdc262f2ffec1a3129ae98d)
2021-10-22 18:30:30 +08:00
世界 5bf2b31883
Add hook to init and listen observatory statuses 2021-10-22 17:59:41 +08:00
世界 390a76ff61
Export instance context 2021-10-22 17:59:41 +08:00
世界 486f96838d
Parse port in dns address 2021-10-22 17:59:41 +08:00
世界 710b283204
Add more default ttl 2021-10-22 17:59:41 +08:00
世界 073ba6f1c5
Add ApplySockopt 2021-10-22 17:59:41 +08:00
世界 a4f657f787
Remove unused 2021-10-22 17:59:40 +08:00
世界 ea94d07f65
Add domainStrategy to outbound &
Add preferIPv4/6 to domainStrategy
2021-10-22 17:59:27 +08:00
世界 14aa152a8a
Add skipFakeDNS to inbound session 2021-10-22 17:59:26 +08:00
世界 e316cd4c66
Hook to replace DOHL dialer 2021-10-22 17:59:26 +08:00
世界 16d96aa54d
Add uid and app status in routing rule 2021-10-22 17:59:26 +08:00
世界 707efd6d12
Add loopback outound 2021-10-22 17:58:37 +08:00
世界 5c366db847
Add observatory / latestPing balancing strategy
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-22 17:16:20 +08:00
世界 77d0419aca
Add socks4/4a support 2021-10-22 13:27:31 +08:00
maskedeken 238bd5d050
Add xchacha20-ietf-poly1305 for Shadowsocks 2021-10-22 13:24:29 +08:00
Loyalsoldier 3fe61ed4a2
Feat: add reverse match for GeoIP
(cherry picked from commit 3a50affa0a7316a9ad249f1b2b2996cb88948551)
2021-10-22 13:06:57 +08:00
Xiaokang Wang 13bc0432bc
WebSocket Early Data Protocol Harmonization with V2Ray/V2Fly (#548)
* protocol harmonization with V2Ray/V2Fly by supporting both V2Ray server and XRay server

* protocol harmonization with V2Ray/V2Fly by supporting both V2Ray server and XRay server comment
2021-10-22 12:38:40 +08:00
秋のかえで 9b204ed99b
Fix: Trojan fallback
(cherry picked from commit 908408dd45a58c3c284ecf0dfef539c5681230d9)
2021-10-22 12:38:40 +08:00
yuhan6665 acb81ebe3d
Verify peer cert function for better man in the middle prevention (#746)
* verify peer cert function for better man in the middle prevention

* publish cert chain hash generation algorithm

* added calculation of certificate hash as separate command and tlsping, use base64 to represent fingerprint to align with jsonPb

* apply coding style

* added test case for pinned certificates

* refactored cert pin

* pinned cert test

* added json loading of the PinnedPeerCertificateChainSha256

* removed tool to prepare for v5

* Add server cert pinning for Xtls

Change command "xray tls certChainHash" to xray style

Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-22 12:38:40 +08:00
yuhan6665 6a60332700
Create CODE_OF_CONDUCT.md (#941) (#749)
Co-authored-by: Kslr <kslrwang@gmail.com>
2021-10-22 12:38:40 +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
yuhan6665 0f0a424e8c
Fix: use sorted cidr list (#1156) (#773)
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-22 12:38:40 +08:00
yuhan6665 c4fc277758
add comment for gRPC TLS silent failure behavior (#779)
When gRPC transport have been configured to use TLS, it may silently ignore TLS failure. This may make it harder to diagnose TLS setting issues when gRPC transport is used. This comment is added to help other developers be aware of this caveat.

Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-22 12:38:40 +08:00
yuhan6665 3bf3d96472
Fix: JSON tag case (#1212) (#778)
JSON unmarshal is case insensitive in Golang

Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-22 12:38:40 +08:00
Ovear 3c7189a3e7
Fix: Remove udp connection twice 2021-10-22 12:38:40 +08:00
世界 27224868ab
Override destination if replaced in hosts 2021-10-22 12:38:40 +08:00
世界 50e576081e
Add DispatchLink 2021-10-22 12:38:40 +08:00
世界 625cf7361a
Export PacketConnWrapper 2021-10-22 11:57:38 +08:00
世界 a3023e43ef
Add routeOnly sniffing option 2021-10-22 11:57:23 +08:00
世界 6c9e57d624
Add .gitignore 2021-10-20 19:43:52 +08:00
yuhan6665 76a3f24169
fix concurrent access crash for handler creator (#772)
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-20 19:30:34 +08:00
Arthur Morgan a58e20c811
v1.5.0 2021-10-20 14:55:23 +08:00
Arthur Morgan 2ab80d68ef upgrade dependencies 2021-10-20 14:47:57 +08:00
dependabot[bot] a208b07a73
Bump github.com/lucas-clemente/quic-go from 0.23.0 to 0.24.0 (#777)
Bumps [github.com/lucas-clemente/quic-go](https://github.com/lucas-clemente/quic-go) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/lucas-clemente/quic-go/releases)
- [Changelog](https://github.com/lucas-clemente/quic-go/blob/master/Changelog.md)
- [Commits](https://github.com/lucas-clemente/quic-go/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: github.com/lucas-clemente/quic-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-20 14:44:40 +08:00
yuhan6665 6b6974c804
Fakedns improvements (#731)
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: sixg0000d <sixg0000d@gmail.com>
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-20 13:15:49 +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
Arthur Morgan 500c6de359 adjust 2021-10-20 00:52:49 +08:00
yuhan6665 a229a7f85e
Revert "cancel failed grpc connection (#707)" (#768)
This reverts commit 0f79126379.
2021-10-16 21:07:45 +08:00
世界 cd4631ce99
Merge dns (#722)
* DNS: add clientip for specific nameserver

* Refactoring: DNS App

* DNS: add DNS over QUIC support

* Feat: add disableCache option for DNS

* Feat: add queryStrategy option for DNS

* Feat: add disableFallback & skipFallback option for DNS

* Feat: DNS hosts support multiple addresses

* Feat: DNS transport over TCP

* DNS: fix typo & refine code

* DNS: refine code

* Add disableFallbackIfMatch dns option

* Feat: routing and freedom outbound ignore Fake DNS

Turn off fake DNS for request sent from Routing and Freedom outbound.
Fake DNS now only apply to DNS outbound.
This is important for Android, where VPN service take over all system DNS
traffic and pass it to core.  "UseIp" option can be used in Freedom outbound
to avoid getting fake IP and fail connection.

* Fix test

* Fix dns return

* Fix local dns return empty

* Apply timeout to dns outbound

* Update app/dns/config.go

Co-authored-by: Loyalsoldier <10487845+loyalsoldier@users.noreply.github.com>
Co-authored-by: Ye Zhihao <vigilans@foxmail.com>
Co-authored-by: maskedeken <52683904+maskedeken@users.noreply.github.com>
Co-authored-by: V2Fly Team <51714622+vcptr@users.noreply.github.com>
Co-authored-by: CalmLong <37164399+calmlong@users.noreply.github.com>
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: 秋のかえで <autmaple@protonmail.com>
Co-authored-by: 朱聖黎 <digglife@gmail.com>
Co-authored-by: rurirei <72071920+rurirei@users.noreply.github.com>
Co-authored-by: yuhan6665 <1588741+yuhan6665@users.noreply.github.com>
Co-authored-by: Arthur Morgan <4637240+badO1a5A90@users.noreply.github.com>
2021-10-16 21:02:51 +08:00
lucifer 5e606169f1
gRPC: Parse X-Real-IP header, fix #766 (#769) 2021-10-14 12:10:19 +08:00
Arthur Morgan 3f3b54f673 go 1.17.2 2021-10-13 00:49:48 +08:00
Arthur Morgan 575c7a9687 adjust 2021-10-13 00:49:31 +08:00
Arthur Morgan bad397bf22 fix typo 2021-10-13 00:49:05 +08:00
yuhan6665 e6711d1b48
Add header and method support to http2 transport (#755)
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-12 15:58:12 +00:00
yuhan6665 4bb61701b5
Add tcpKeepAliveInterval in transport sockopt (#754)
Co-authored-by: Ahmad Karimi <ak12hastam@gmail.com>
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-12 15:39:08 +00:00
yuhan6665 ef4c63812b
Fix: nullcheck on alternative systemDialer (#752)
* fix: null-check on alternative systemDialer
* delete deprecated option DualStack

Co-authored-by: rurirei <72071920+rurirei@users.noreply.github.com>
2021-10-12 15:32:45 +00:00
yuhan6665 e50f2af418
Fix flaky TestServiceSubscribeRoutingStats (#750) 2021-10-12 15:29:56 +00:00
yuhan6665 3554886ce1
vformat supports multi-core processing (#757)
* Feat: vformat supports multi-core processing (#996)

Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-12 15:29:22 +00:00
yuhan6665 a97d45c93a
grammar fix (#745)
Co-authored-by: QxQ <59914293+U-v-U@users.noreply.github.com>
2021-09-30 20:50:46 +08:00