1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00
Commit Graph

51 Commits

Author SHA1 Message Date
Shelikhoo
3ef7feaeaf
update version: auto replacement to v5 path 2022-01-02 15:16:23 +00:00
Loyalsoldier
dce8764fd7
Lint: fix lint (#1427)
* Lint: replace golint with revive
* Lint: fix lint
2021-11-27 17:16:41 +08:00
Loyalsoldier
43447aa2e4
Chore: format code to fix lint (#1426) 2021-11-27 14:32:07 +08:00
Ye Zhihao
d4da365c5f
Refactor: strmatcher module (#1333)
* Reorganize strmatcher's package structure

* Rename types in strmatcher package according to their file names

* Stablize strmatcher's Matcher interface

* Implement []matcherEntry as SimpleMatcherGroup

* Implement mph algorithm extracted from MphIndexMatcher as MphMatcherGroup

* Implement AddMatcher/AddFullMatcher/AddDomainMatcher/AddSubstrMatcher for each MatcherGroup

* Stablize strmatcher's MatcherGroup interface

* Stablize strmatcher's IndexMatcher interface

* Update strmatcher's benchmark

* Compatibility fix for app/router's DomainMatcher condition

* Fix code quality issue

* Fix basic matcher issues

* Update priority specification for Substr matcher
2021-10-31 18:01:13 +08:00
世界
a66bb28aee
Reformat code 2021-10-28 18:34:19 +08:00
世界
8cc6fbc6f9
Fix queryStrategy ignored (#1285) 2021-09-27 22:13:40 +01:00
世界
f383f896ed
Add disableFallbackIfMatch dns option 2021-09-27 22:10:54 +01:00
Shelikhoo
6dc2dfb6c7
use custom loading rules for dns 2021-09-10 20:35:02 +01:00
Shelikhoo
5182727054
fix CountryCode not set 2021-09-07 11:09:34 +01:00
Shelikhoo
aa17eacc8d
register dns 2021-09-07 08:00:17 +01:00
Shelikhoo
db19747d96
reverting use pointer for small data structure 2021-09-04 11:53:05 +01:00
database64128
c78ee5aac7
🏡 Housekeeping: Update to Go 1.17 (#1215)
* ⬆ Update to Go 1.17

* 🏗 Update workflows and add windows-arm64

* 💾 Update generated files

* 📛 Update not-so-friendly filenames
2021-08-21 13:20:40 +08:00
Loyalsoldier
a783cd5f08
DNS: refine code (#1193) 2021-08-10 11:08:05 +08:00
Shelikhoo
9a03b425c9
apply coding style 2021-06-22 12:56:35 +01:00
Loyalsoldier
47bbb5a3de
Fix: DNS hosts proxied domain priority (#886) 2021-04-11 11:52:12 +08:00
Loyalsoldier
bada0e48b4
Feat: DNS hosts support multiple addresses (#884) 2021-04-10 21:56:08 +08:00
Loyalsoldier
108a700e85
Fix: fakedns option (#879) 2021-04-09 15:02:42 +01:00
Loyalsoldier
3f40089caf
Feat: add disableFallback & skipFallback option for DNS (#864) 2021-04-09 10:35:26 +08:00
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