Commit Graph

60 Commits (03ade2302203a9ff7e2874df738503e781a7ff5a)

Author SHA1 Message Date
yuhan6665 496b2c02c5
Fix context api and document (#727)
* Fix Dial function crash instance when there is no instance context in the ctx

* check ctx to fix. (#841)

* Feat: core.ToContext(ctx, v) for ctx initialization (#852)

* remove exported API: toContext

* Remove unnecessary API

* rework document for API

* fix: make sure the ctx is propagated to connections by detached connection

Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: rurirei <72071920+rurirei@users.noreply.github.com>
2022-02-19 22:45:41 -05:00
yuhan6665 41ce6ccf9f
Make reverse proxy compatible with v2fly (#924)
* Make reverse proxy compatible with v2fly

* Fix gitignore

* Regenerate proto files

- fix v2ray name in loopback

* Fix fly.org in unit tests
2022-02-04 21:59:50 -05:00
Machtergreifung 9ad26fa049
chore fixed (#897)
* chore fixed
2022-01-12 21:51:47 -05:00
Machtergreifung 800b3bd3fe
chore fixed (#895)
* chore fixed
2022-01-10 23:39:58 -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 7c240e8630 Fix null pointer exception for observatory
Core setup router object first, when InjectContext() is called, observatory object is still null,
so observatory need to be injected after InjectContext()
2021-11-20 00:48:02 -05:00
lucifer9 d6ae4e9ba2 Make it easier to configure multiple listening ports 2021-11-17 23:13:15 -05:00
Zhu Sheng Li 28b17b529d
Add concurrency option for outbound observation
Add `enableConcurrency` option, false by default.

If it's set as `true`, start probing outbounds concurrently in every
circle of observation. Wait `probeInterval` between observation circles.
2021-10-26 13:09:03 +08:00
yuhan6665 abb8ba8b0e
Observatory related fixes (#788)
* fix:observatory not supported by multi-json

* Fix: observatory starts with empty config & fails to close (#957)

* Update strategy_leastping.go (#1019)

* add custom probe URL support for observatory

* add custom probe interval for observer

* apply coding style

* Fix: observatory log & JSON config(#1211)

Co-authored-by: ihotte <ihotte@yeah.net>

* Change default probe url from api.v2fly.org to www.google.com

* Cherry-pick missing code from branch 'dev-advloadblancer-2'

Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Co-authored-by: fanyiguan <52657276+fanyiguang@users.noreply.github.com>
Co-authored-by: ihotte <3087168217@qq.com>
Co-authored-by: ihotte <ihotte@yeah.net>
2021-10-26 13:00:31 +08:00
世界 5c366db847
Add observatory / latestPing balancing strategy
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
2021-10-22 17:16:20 +08:00
Loyalsoldier 3fe61ed4a2
Feat: add reverse match for GeoIP
(cherry picked from commit 3a50affa0a7316a9ad249f1b2b2996cb88948551)
2021-10-22 13:06:57 +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
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
世界 a3023e43ef
Add routeOnly sniffing option 2021-10-22 11:57:23 +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
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
Arthur Morgan 500c6de359 adjust 2021-10-20 00:52:49 +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
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 e50f2af418
Fix flaky TestServiceSubscribeRoutingStats (#750) 2021-10-12 15:29:56 +00:00
KallyDev 4abf98c1be
Move from deprecated ioutil to os and io packages (#744) 2021-09-29 02:49:34 +08:00
hmol233 7033f7cf5f
Fix: protobuf file (#724) 2021-09-20 22:41:09 +08:00
Arthur Morgan ffc2f7c4e2 Style: format code 2021-09-20 21:00:55 +08:00
Arthur Morgan 24b637cd5e
Fix: CounterConnection with ReadV/WriteV (#720)
Co-authored-by: JimhHan <50871214+JimhHan@users.noreply.github.com>
2021-09-20 20:11:21 +08:00
yuhan6665 42d158bd85
vprotogen refine (#717)
* Update all proto files with existing vprotogen
* Chore: remove protoc-gen-gofast
* Feat: vprotogen adds version detector to block generation code from old protobuf version
* Feat: vprotogen refine logic

Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-09-18 01:16:14 +08:00
hmol233 86a8fb5d84
Move `DomainStrategy` & `DialerProxy` to `DialSystem`
Fix https://github.com/XTLS/Xray-core/issues/608
2021-06-18 19:28:02 +08:00
秋のかえで 7b7084f825
Refactor: A faster DomainMatcher implementation (#348)
Co-authored-by: DarthVader <61409963+darsvador@users.noreply.github.com>
2021-04-18 13:21:17 +08:00
JimhHan de54d4b08f
Fix: sniffer call IP() on a DomainAddress 2021-03-17 23:29:06 +08:00
JimhHan 32713bcc0e
Fix: Context without proper session
close https://github.com/XTLS/Xray-core/issues/383
2021-03-17 23:27:42 +08:00
Jim Han 3fe85449a9
Use 198.18.0.0/16 as default Fake IP Pool (#377) 2021-03-14 15:58:27 +00:00
Jim Han e0526c27b3
Removal: confonly (#368) 2021-03-14 15:05:08 +00:00
RPRX 439c91d509
Update fakedns_test.go 2021-03-10 14:55:51 +00:00
Jim Han d7cd71b741
Resolve conflicting changes in DNS #309 #341 (#346)
Co-authored-by: yuhan6665 <1588741+yuhan6665@users.noreply.github.com>
2021-03-07 07:12:50 +00:00
yuhan6665 f50eff5ebb
Add Fake DNS support (#309)
Co-authored-by: Xiaokang Wang <xiaokangwang@outlook.com>
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Co-authored-by: kslr <kslrwang@gmail.com>
2021-03-07 04:39:50 +00:00
Jim Han db32ce6fd9
Enhance DNS and Dialer (#341) 2021-03-06 16:29:17 +00:00
kokeri ca633fc8c5
Chore: Add GitHub Actions (#251)
Co-authored-by: xinb <netwhilt@outlook.com>
Co-authored-by: 秋のかえで <autmaple@protonmail.com>
Co-authored-by: Jim Han <50871214+JimhHan@users.noreply.github.com>
2021-03-02 22:46:50 +08:00
Xray9 c345d4818e
Fix available mux picker in reverse portal (#274) 2021-03-01 07:26:53 +00:00
Jim Han 9aa49be703
Restrict tag to be unique (#258) 2021-02-18 09:53:10 +00:00
Jim Han 4cd343f2d5
Fix tests (#201)
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2021-01-30 13:01:20 +00:00
Arthur Morgan 5aa053a65f
Convert domain names to lowercase before matching (#195)
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2021-01-21 23:37:55 +00:00
秋のかえで 0b4858d016
Feature: Exclude some domains in sniffing destOverride (#151)
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2021-01-21 20:50:09 +00:00
Jim Han 7f5e34c857
Regenerate .pb.go files (#187)
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2021-01-21 18:58:19 +00:00
eMeab 638e8384b6
Optimized log (#167) 2021-01-14 14:45:23 +00:00
Arthur Morgan 11a851f957
Fix non-local DoH requests & Apply routing (#147) 2021-01-13 07:53:08 +00:00
RPRX ee15cc253f
Improve configuration detector (cone or symmetric) 2021-01-10 07:50:21 +00:00
RPRX 43eb5d1b25
16 -> 60, 8 -> 300
https://github.com/XTLS/Xray-core/issues/129#issuecomment-757355137

十分感谢 @GleenJi 等协助测试
2021-01-10 04:50:26 +00:00