1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-14 08:15:55 -05:00
Commit Graph

54 Commits

Author SHA1 Message Date
Shelikhoo
7a6f887fe3
relocated browser forwarder interface 2021-05-01 00:06:10 +01:00
Shelikhoo
2f35bbecbe
Make sure FakeDNSEngineRev0 also satisfy FakeDNSEngine signature 2021-04-13 15:23:30 +01:00
Shelikhoo
f5d2ddedb4
Merge branch 'dev-fakednsimprovement' 2021-04-13 15:14:47 +01:00
Shelikhoo
1ed32e35a6
Fake DNS additional API for fake dns + others and request aware response 2021-04-10 00:01:14 +01:00
Shelikhoo
5a61749328
add least balancing strategy 2021-04-08 23:17:52 +01:00
Shelikhoo
6f913b31e2
structure for observatory 2021-04-08 23:16:55 +01:00
loyalsoldier
24948c6520
Merge branch 'master' into dev-wsimprovement 2021-03-28 08:40:05 +08:00
Shelikhoo
f63ee69fcf
added forwarder service 2021-03-20 21:59:30 +00:00
Shelikhoo
57b4214284
added definition for websocket browser forwarder 2021-03-20 21:58:07 +00:00
Loyalsoldier
e6aaa57def
Feat: add queryStrategy option for DNS (#794) 2021-03-19 15:55:18 +08:00
yuhan6665
afb8385a7e
Feat: routing and freedom outbound ignore Fake DNS (#696)
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.

Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-02-23 10:17:20 +08:00
Loyalsoldier
f94dd11a8c
Chore: change module name (#677) 2021-02-17 04:31:50 +08:00
Xiaokang Wang
38da831b75
Feature: Fake DNS support (#406)
* Add fake dns

A new config object "fake" in DnsObject for toggling fake dns function

Compare with sniffing, fake dns is not limited to http and tls traffic.
It works across all inbounds. For example, when dns request come
from one inbound, the local DNS server of v2ray will response with a
unique fake IP for every unique domain name. Then later on v2ray
received a request to one of the fake IP from any inbounds, it will
override the request destination with the previously saved domain.

By default, v2ray cache up to 65535 addresses. The old records will
be discarded bases on LRU. The fake IP will be 240.x.x.x

* fix an edge case when encounter a fake IP in use

* Move lru to common.cache package

* Added the necessary change to obtain request IP from sniffer

* Refactor the code so that it may stop depending on global variables in the future.

* Replace string manipulation code with more generic codes, hopefully this will work for both IPv4 and IPv6 networks.

* Try to use IPv4 version of address if possible

* Added Test Case for Fake Dns

* Added More Test Case for Fake Dns

* Stop user from creating a instance with LRU size more than subnet size, it will create a infinite loop

* Move Fake DNS to a separate package

* Generated Code for fakedns

* Encapsulate Fake DNS as a Instance wide service

* Added Support for metadata sniffer, which will be used for Fake DNS

* Dependency injection for fake dns

* Fake DNS As a Sniffer

* Remove stub object

* Remove global variable

* Update generated protobuf file for metadata only sniffing

* Apply Fake DNS config to session

* Loading for fake dns settings

* Bug fix

* Include fake dns in all

* Fix FakeDns Lint Condition

* Fix sniffer config

* Fix lint message

* Fix dependency resolution

* Fix fake dns not loaded as sniffer

* reduce ttl for fake dns

* Apply Coding Style

* Apply Coding Style

* Apply Coding Style

* Apply Coding Style

* Apply Coding Style

* Fix crashed when no fake dns

* Apply Coding Style

* Fix Fake DNS do not apply to UDP socket

* Fixed a bug prevent FakeDNS App Setting from become effective

* Fixed a caveat prevent FakeDNS App Setting from become effective

* Use log comparison to reduce in issue when it comes to really high value typical for ipv6 subnet

* Add build tag for fakedns

* Removal of FakeDNS specific logic at DNS client: making it a standard dns client

* Regenerate auto generated file

* Amended version of configure file

* Bug fixes for fakeDNS

* Bug fixes for fakeDNS

* Fix test: remove reference to removed attribute

* Test: fix codacy issue

* Conf: Remove old field support

* Test: fix codacy issue

* Change test scale for TestFakeDnsHolderCreateMappingAndRollOver

* Test: fix codacy issue

Co-authored-by: yuhan6665 <1588741+yuhan6665@users.noreply.github.com>
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Co-authored-by: kslr <kslrwang@gmail.com>
2021-02-08 18:18:52 +08:00
V2Fly Team
66e203f156
DNS: refine skipRoutePick (#558) 2020-12-30 18:35:19 +08:00
Chinsyo
231f5bf024
Add missing deprecation notice to deprecated code (#437) 2020-11-20 15:18:44 +08:00
loyalsoldier
784775f689
Refine code according to golangci-lint results 2020-10-11 19:22:46 +08:00
loyalsoldier
b181045b0c
Errorgen: support to run outside of GOPATH 2020-10-04 13:06:12 +08:00
Ye Zhihao
67f409de04
Stats: Implements blocking/non-blocking messaging of Channel (#250) 2020-10-03 03:06:32 +08:00
Vigilans
fa37f82b89 Stats: Add ChannelConfig & Return error on subscription 2020-09-23 22:35:13 +08:00
Kslr
525d4e13a9
Merge pull request #197 from Vigilans/vigilans/stats-channel-runnable
Stats: Implement common.Runnable for Channel feature
2020-09-20 22:39:46 +08:00
Vigilans
4d5a4f4cb6 Routing: Implement Route interface as the routing result of Router 2020-09-18 17:30:59 +08:00
Vigilans
4fca2fe940 Implement common.Runnable for stats.Channel feature 2020-09-15 23:04:26 +08:00
Vigilans
5a497890e6 Routing Context: Fix GetUser() & Use string for Attributes Value 2020-09-13 00:34:35 +08:00
Vigilans
0406cd896b Add UnregisterChannel & Modify unregistering logic 2020-09-09 11:33:29 +08:00
Loyalsoldier
d7c99c901a
Fix: app/stats.Manager does not implement features/stats.Manager (#171) 2020-09-09 11:26:23 +08:00
Vigilans
bff96a7a52 Support Channel (Observer Pattern) in Stats Manager 2020-09-04 15:07:42 +08:00
Vigilans
f9d37b724c Extract session information during routing as routing context 2020-09-04 11:32:19 +08:00
DuckSoft
1525712214
some typo fixes
note: there are other typos in external/ folder.
considering the fact that the folder "will be removed in future", I skipped those typos.
2020-07-17 18:09:24 +08:00
yuhan6665
886598542c Add stats counter for outbounds 2020-06-27 00:31:46 -04:00
Shelikhoo
220b783caa
Align Timeout Value 2020-06-03 09:12:45 +08:00
Darien Raymond
9957c64b4a
correctly propagate dns errors all the way through.
the internal dns system can correctly handle the cases where:
1) domain has no A or AAAA records
2) domain doesn't exist
fixes #1565
2019-02-21 13:43:48 +01:00
Darien Raymond
6b355ef461
fix a typo in local dns 2018-12-06 21:34:05 +01:00
Darien Raymond
21b3f66b8b
fix IP parsing in local dns client 2018-12-06 20:11:45 +01:00
Darien Raymond
4104a86b6c
use default dns resolver to prevent errors in android 2018-12-05 15:48:40 +01:00
Darien Raymond
28fa84ce69
API doc 2018-12-03 22:44:42 +01:00
Darien Raymond
480175691c
comment 2018-11-22 22:49:45 +01:00
Darien Raymond
39a092b178
fix #1427 2018-11-22 19:07:49 +01:00
Darien Raymond
bb1efdebd1
support querying either IPv4 or IPv6 dns 2018-11-19 20:42:02 +01:00
Darien Raymond
c26a4b407b
adjust default value of buffer size 2018-11-11 10:54:47 +01:00
Darien Raymond
73d3be424b
prototype for balancing rules 2018-11-07 21:08:20 +01:00
Darien Raymond
128a90b98b
move link to transport 2018-11-03 12:36:29 +01:00
Darien Raymond
9e66f315e6
update mocks 2018-10-23 22:41:27 +02:00
Darien Raymond
5fc606ce9d
relocate mocks 2018-10-23 22:27:45 +02:00
Darien Raymond
f78cf6cfc2
testing with mock 2018-10-22 15:58:52 +02:00
Darien Raymond
307aac26b3
simplify dependency resolution 2018-10-22 11:26:22 +02:00
Darien Raymond
9decb3fe36
comments 2018-10-22 08:42:10 +02:00
Darien Raymond
a5dcb0f13e
refactor dependency resolution 2018-10-21 10:27:13 +02:00
Darien Raymond
abf0cb1ec4
move function to features 2018-10-13 15:15:49 +02:00
Darien Raymond
2440d276f1
comments 2018-10-13 12:09:58 +02:00
Darien Raymond
d730637239
Require Type() for Feature 2018-10-12 23:57:56 +02:00