1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
Commit Graph

33 Commits

Author SHA1 Message Date
Loyalsoldier
e6aaa57def
Feat: add queryStrategy option for DNS (#794) 2021-03-19 15:55:18 +08:00
Loyalsoldier
45740be4af
Fix panic: index out of range (#727) 2021-03-03 16:53:42 +08:00
CalmLong
7ebf3afc31
Feat: add disableCache option for DNS (#705)
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-02-24 16:03:50 +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
Loyalsoldier
c27ed16e6a
Fix: DNS compatible with localhost nameserver (#530) 2020-12-19 12:17:55 +08:00
Ye Zhihao
d8c03f10b5
Refactoring: DNS App (#169)
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2020-12-18 17:24:33 +08:00
loyalsoldier
b181045b0c
Errorgen: support to run outside of GOPATH 2020-10-04 13:06:12 +08:00
Darien Raymond
091fa6ad23
use new errorgen 2018-09-30 23:08:41 +02:00
Darien Raymond
1d001c090b
comments 2018-04-19 21:33:18 +02:00
Darien Raymond
ab4f245313
overrideable dns 2017-12-19 23:55:09 +01:00
Darien Raymond
d43a23aa96
move error generator to common 2017-12-03 01:04:57 +01:00
Darien Raymond
0e01e9e9ca
comments 2017-04-09 14:49:40 +02:00
Darien Raymond
35248497d2
refactor error messages 2017-04-09 01:43:25 +02:00
Darien Raymond
43fb425fd7
unified dispatcher interface 2017-02-03 22:50:01 +01:00
Darien Raymond
f046f334cd
move common/log to app/log 2017-02-01 21:35:40 +01:00
Darien Raymond
c48e1f02a6
comments 2017-01-13 14:33:32 +01:00
Darien Raymond
17504d2aac
context'ize apps 2017-01-13 13:41:40 +01:00
Darien Raymond
b11d48d73f
simplify app design 2017-01-06 15:32:36 +01:00
v2ray
07a86f549b
unified import path 2016-08-20 20:55:45 +02:00
v2ray
7765fedd78 modulize dispatcher and proxyman 2016-05-17 23:05:52 -07:00
v2ray
dac1339d6e Use dns in router 2016-05-16 00:25:34 -07:00
v2ray
3b545abe02 dns client implementation 2016-05-15 23:09:28 -07:00
v2ray
a37819c330 rename RegisterApp to Register 2016-05-11 12:05:58 -07:00
v2ray
2031c13a7f refactor app.Space 2016-01-31 17:01:28 +01:00
v2ray
2d233295e6 simplify stringlist 2016-01-15 15:23:12 +01:00
Darien Raymond
9e84519134 validity map 2015-12-14 13:14:10 +00:00
Darien Raymond
a540d7dc99 allow dns modification only from trusted tags 2015-12-11 11:08:07 +00:00
v2ray
46ab9c45cc space with context 2015-12-10 23:55:39 +01:00
v2ray
5b3e84ede6 dns config 2015-12-10 22:08:36 +01:00
v2ray
bc144248e2 Increase dns cleanup interval to 60 seconds 2015-12-09 00:30:58 +01:00
v2ray
e1c58fae2b dns cache 2015-12-06 11:00:10 +01:00