1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00
Commit Graph

157 Commits

Author SHA1 Message Date
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
7de5bca056
Remove Bazel (#469)
due to https://github.com/v2fly/v2ray-core/pull/468
2020-11-30 20:48:17 +08:00
Loyalsoldier
b68f943c78
Fix lint according to golangci-lint (#439) 2020-11-22 05:05:01 +08:00
Xiaokang Wang
61112d8af7
Workaround for muti-json's hard coded override method (#409)
* Simple workaround for muti-json unable to automatically understand new config options.

* Update jsonem.go
2020-11-21 02:50:46 +08:00
Kslr
623cb24644
Remove XTLS (#431)
* remove xtls

* generate pb

* Update protoc

* Clean up go.mod & go.sum

* format code

* restore vless flow

* fix codacy

* do NOT interfere with pb.go files

Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2020-11-20 15:53:10 +08:00
Xiaokang Wang
3684dc15de
Merge pull request #351 from v2fly/dev-fix-mutijson-dep
Fix json parsing dependency introduced by mutijson config
2020-10-26 15:44:58 +00:00
Shelikhoo
9391f7c377
Apply Coding Style 2020-10-23 19:51:39 +01:00
Kslr
0dc17643a0
Merge pull request #299 from forever8938/master
Load JSON internally by default
2020-10-24 01:39:11 +08:00
Shelikhoo
fd2638c522
Fix json parsing dependency introduced by mutijson config 2020-10-23 15:04:03 +01:00
kslr
3c6e11673f revert: support yaml config 2020-10-20 14:01:16 +08:00
ayanamist
5230dfb71e
Support YAML config through JSON (#331) 2020-10-19 07:28:33 +08:00
loyalsoldier
784775f689
Refine code according to golangci-lint results 2020-10-11 19:22:46 +08:00
forever8938
51d3fc694f
Load JSON internally by default
why not?
2020-10-10 21:06:13 +08:00
Loyalsoldier
ba99e32b2d
Bazel: discard GOPATH (#278) 2020-10-07 18:35:21 +08:00
loyalsoldier
b181045b0c
Errorgen: support to run outside of GOPATH 2020-10-04 13:06:12 +08:00
Loyalsoldier
dcf368bd93
Refine Azure Pipelines & Bazel: remove unnecessary steps (#246)
* Bazel: remove GPG sign
* Azure Pipelines: remove unnecessary steps
2020-10-02 16:09:33 +08:00
maskedeken
e445d21f4b
Add trojan protocol support (#181)
* Add trojan protocol support

Co-authored-by: Eken Chan <ekenchan@msn.com>
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2020-09-26 23:31:24 +08:00
RPRX
97eddc2374
Add XTLS support 2020-09-21 14:56:43 +00:00
RPRX
bad7e2cfd8
VLESS PREVIEW 1.1 2020-07-28 15:00:23 +00:00
RPRX
c8f266c740
Adjust Bazel 2020-07-19 02:40:33 +00:00
rprx
4947537eee
Adjust arm build 2020-06-28 08:56:55 +00:00
rprx
694180fc9a
Add windows arm build (#39)
* Add windows arm build

* Add windows arm build

* Add windows arm build
2020-06-28 00:46:43 +08:00
Agioi Theodoroi
37a55653e9
remove unused parameter 2020-06-27 07:51:44 +08:00
Agioi Theodoroi
97074c5bf4
gofmt 2020-06-27 07:51:43 +08:00
kslr
bc96f75bcb add armv5 2020-06-19 20:20:14 +08:00
vcptr
0fd0c374c1 fix config compatibility with old inbound/inboundDetors/out 2020-03-24 21:52:03 +08:00
vcptr
94ea326d89 fix confdir env startup priority 2020-03-24 21:52:03 +08:00
Shelikhoo
e61b44ff78
Fix Test Parse flag before flag defined by V2 in main 2020-03-23 11:34:53 +08:00
vcptr
0d71d3dcf8 revert back to multiconfig 2020-03-19 19:11:16 +08:00
Kslr
fdbec9a141
Revert "multiple config" 2020-01-02 01:23:56 +08:00
Kslr
e6f226c64d
Revert "add arg -confdir" 2020-01-02 01:14:36 +08:00
vcptr
e50afd6e44 trim err msg 2019-12-31 13:29:25 +08:00
vcptr
c3f55dcd67 filter .json in confDir 2019-12-31 13:11:34 +08:00
vcptr
5ae47d45c2 multiconf with -confdir arg 2019-12-31 11:45:19 +08:00
Kslr
3c96c6ac22
Merge pull request #2124 from vcptr/newconfig
multiple config
2019-12-30 17:22:30 +08:00
vcptr
9d1cac1680
arm release include GOARM=6 2019-12-29 13:14:08 +08:00
vcptr
f578f0d617 add comment to please codacy 2019-12-24 01:13:10 +08:00
vcptr
f14eb97e3c rearrange loader 2019-12-16 10:22:17 +08:00
vcptr
75f0879c12 proper handle stdin 2019-12-14 23:48:56 +08:00
vcptr
1bb34bfe17 abstract type for conf load func 2019-12-14 23:48:56 +08:00
vcptr
1e76123a4c main loads multiple 2019-12-14 23:48:56 +08:00
Darien Raymond
9a125276b5
fix bazel build 2019-02-10 19:19:05 +01:00
Darien Raymond
4eb2b5e607
merge ext into core 2019-02-10 19:04:11 +01:00
Darien Raymond
7505be8bfc
enable dns outbound 2019-02-06 17:06:03 +01:00
Darien Raymond
769eeb0efd
remove plugin support as it is not practical 2018-12-07 09:50:11 +01:00
Darien Raymond
d4613f156b
defer at right place 2018-12-04 14:16:31 +01:00
Darien Raymond
0bc22154e5
defer server close 2018-12-04 14:15:35 +01:00
Darien Raymond
5bd47c89c4
enable quic transport 2018-11-21 22:03:00 +01:00
Darien Raymond
842a089dad
refactor multibuffer 2018-11-18 19:36:36 +01:00
Darien Raymond
0f324a613e
remove MultiBuffer.Release 2018-11-17 22:45:07 +01:00
Darien Raymond
14646940a0
trigger GC after loading 2018-11-16 17:17:11 +01:00
Darien Raymond
2020bbe606
prototype for reverse proxy 2018-10-28 00:03:11 +02:00
Darien Raymond
222de64515
more packages 2018-10-03 23:27:42 +02:00
Darien Raymond
091fa6ad23
use new errorgen 2018-09-30 23:08:41 +02:00
Darien Raymond
d55fbd7f8d
simplify error creation 2018-09-30 18:39:53 +02:00
Darien Raymond
02ae48095b
add wireguard fake header 2018-08-27 21:52:25 +02:00
Darien Raymond
00384e69d4
remove speedtest 2018-07-25 23:35:02 +02:00
Darien Raymond
a21d769e37
speedtest 2018-07-25 19:22:36 +02:00
Darien Raymond
8b8ae8342b
prevent systemd from restarting when configuration error 2018-07-17 11:53:36 +02:00
Darien Raymond
0d94d25688
prototype of mtproto proxy 2018-07-04 17:48:48 +02:00
Darien Raymond
67f5292f38
fix lint errors 2018-05-25 23:20:24 +02:00
Darien Raymond
f9277958a5
DTLS header for MKCP 2018-05-25 17:16:15 +02:00
Darien Raymond
68da956fc4
re-generate code 2018-05-25 11:56:01 +02:00
Darien Raymond
97341693f3
add an option to include JSON loader in v2ray binary. 2018-04-22 22:54:27 +02:00
Darien Raymond
b7fc1f0bd6
scenario test for domain socket 2018-04-09 20:45:23 +02:00
Darien Raymond
286e9a3835
conf loader as component 2018-04-09 11:43:13 +02:00
Darien Raymond
b7f2f30244
support fetching config from http 2018-04-08 23:22:55 +02:00
Darien Raymond
0975e26ed1
command handler for stats 2018-03-31 10:30:12 +02:00
Darien Raymond
8d679fb5c8
include h2 2018-03-01 21:10:45 +01:00
Darien Raymond
ab9ca3b842
move json config into a separate package 2018-02-17 21:22:51 +01:00
Darien Raymond
242e65e424
move Println to main 2018-02-16 14:03:55 +01:00
Darien Raymond
2a07838bb9
extendable config format 2018-02-14 23:57:40 +01:00
Darien Raymond
94125236e6
include log command 2018-02-14 22:00:15 +01:00
Darien Raymond
f4ec85d320
fix loading of json config 2018-02-12 11:40:42 +01:00
Darien Raymond
20fc4950b2
comments 2018-02-11 23:28:42 +01:00
Darien Raymond
2328c69fba
include new packages 2018-02-06 13:47:36 +01:00
Darien Raymond
292d7cc353
massive refactoring for interoperability 2018-01-10 12:22:37 +01:00
Darien Raymond
2bf5a008f0
fix error levels 2017-12-27 22:25:12 +01:00
Darien Raymond
ab4f245313
overrideable dns 2017-12-19 23:55:09 +01:00
Darien Raymond
cad3ab41aa
hide console window when running v2ctl. fix #779 2017-12-13 13:42:07 +01:00
Darien Raymond
53b0f91873
add env variable for config file 2017-12-05 11:58:12 +01:00
Darien Raymond
d43a23aa96
move error generator to common 2017-12-03 01:04:57 +01:00
Darien Raymond
5f91257018
fix error message 2017-11-27 23:00:36 +01:00
Darien Raymond
3214a5078c
customizable policy 2017-11-27 22:09:30 +01:00
Darien Raymond
47126cc632
exit immediately on error 2017-11-23 10:39:40 +01:00
Darien Raymond
6069b77baa
prototype for plugins 2017-11-22 23:00:46 +01:00
Darien Raymond
ee8d2ebfa9
remove json parser from core 2017-11-19 21:44:49 +01:00
Darien Raymond
e69e6d00cb
actually run v2ctl 2017-11-17 00:51:04 +01:00
Darien Raymond
268d7264e8
use external config converter first, and then fallback to the internal one 2017-11-11 22:29:00 +01:00
Darien Raymond
bf64c449de
listen on all ips 2017-04-17 14:06:02 +02:00
Darien Raymond
d809973621
pprof debug 2017-04-15 22:50:42 +02:00
Darien Raymond
35248497d2
refactor error messages 2017-04-09 01:43:25 +02:00
Darien Raymond
fc31f9b94c
refactor error interface 2017-04-06 15:13:09 +02:00
Darien Raymond
16ce077d58
rename server 2017-04-05 23:38:37 +02:00
Darien Raymond
722594cb79
hide server implementation detail 2017-02-22 11:30:52 +01:00
Darien Raymond
d3d2fab1d9
refine error messages 2017-02-02 14:42:31 +01:00
Darien Raymond
2f771e7742
fix test break 2017-02-01 21:47:02 +01:00
Darien Raymond
ca721230e1
split listening settings from inbound proxies and apply context 2017-01-26 20:46:44 +01:00
Darien Raymond
588c43f291
kcp header as wechat video 2017-01-03 22:46:22 +01:00
Darien Raymond
7dc7937443
rename ws to websocket 2016-12-23 00:30:46 +01:00