Commit Graph
152 Commits
Author SHA1 Message Date
Shelikhoo 0010783191 Merge chained proxy with transport support 2021-03-03 23:27:26 +00:00
Loyalsoldier 49cf614346 Chore: update dependencies & protobuf (#728) 2021-03-03 17:31:53 +08:00
Shelikhoo 9722488fd6 Disable routing for platform initialized detour 2021-02-28 19:57:57 +00:00
Shelikhoo dd51d32250 Added Transport Layer Chained Proxy Support 2021-02-28 18:47:31 +00:00
Loyalsoldier f94dd11a8c Chore: change module name (#677) 2021-02-17 04:31:50 +08:00
Loyalsoldier f98944c9e0 Chore: update protobuf (#670) 2021-02-11 14:57:20 +08:00
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
database64128 484d740800 🔙 Revert "Add traffic stat of every request in access log (#642)" (#644)
This reverts commit af0120e771.
2021-01-30 20:32:34 +08:00
刘志龙 af0120e771 Add traffic stat of every request in access log (#642)
* Add traffic stat of every request in access log

* Fix: record pointer may be null

* Clarify the data unit in access log
2021-01-30 01:47:13 +08:00
V2Fly Team 66e203f156 DNS: refine skipRoutePick (#558) 2020-12-30 18:35:19 +08:00
Loyalsoldier bb44d01096 Format proto files using clang-format according to google style (#264)
* Format proto files using clang-format according to google style
* Regenerate pb.go files
2020-10-05 08:36:40 +08:00
loyalsoldier b181045b0c Errorgen: support to run outside of GOPATH 2020-10-04 13:06:12 +08:00
Vigilans 4d5a4f4cb6 Routing: Implement Route interface as the routing result of Router 2020-09-18 17:30:59 +08:00
Vigilans f9d37b724c Extract session information during routing as routing context 2020-09-04 11:32:19 +08:00
Loyalsoldier ef460f68f8 Adjust Protocol Buffers (#109)
* Update protoc binary executable files to v3.13.0

* Write proto files in more standard way

* Make go generate & vprotogen compatible with protoc-gen-gofast

* Regenerate pb.go files according to new proto files

* Clean go.sum by running go mod tidy

* Implement mustEmbedUnimplementedServiceServer for gPRC services
2020-08-24 12:10:26 +00:00
Shelikhoo 09b81b78c3 regenerate pb data 2020-06-08 16:16:32 +08:00
vcptr 5d13ec9196 code style optmize in dispatch func 2020-03-12 00:42:29 +08:00
vcptr 04a0c04934 doh route strategy optimized 2020-03-12 00:42:29 +08:00
Shelikhoo 95f808ccd8 Fix merge error 2019-10-30 20:24:38 +08:00
Shelikhoo 35e9da8ca6 Merge branch 'master' of github.com:v2ray/v2ray-core
This are significant amount of change introduced in this merge, needs 
additional testing.
2019-10-30 20:03:11 +08:00
fcying 1cc7702c51 check detour tag size 2019-10-27 23:14:08 +08:00
fcying fa926a1d1d access log add detour tag 2019-10-27 14:24:50 +08:00
fcying 23e5d3cd12 access log add detour tag 2019-06-14 14:43:42 +08:00
Darien Raymond 3828a463ea move sniffing request to session 2019-02-23 00:27:21 +01:00
Darien Raymond 7e5e080488 move sniffing result to session 2019-02-22 16:58:16 +01:00
Darien Raymond 1ab94fed79 optimize v2ctl size 2019-02-01 20:08:21 +01:00
Darien Raymond defc93c49d rename dispatcher to handler 2019-01-12 09:44:59 +01:00
Darien Raymond 3de8389361 rename CloseError() to Interrupt() 2018-12-31 21:25:10 +01:00
Darien Raymond d35c407419 fix #1493 2018-12-31 10:43:08 +01:00
Darien Raymond 0ca762e0e2 fix a deadlock in cacheReader. fix #1471 2018-12-11 09:17:10 +01:00
Darien Raymond 057e271588 update proto lib 2018-12-01 17:39:51 +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 3ccdecaf8f remove vio package 2018-11-03 13:05:23 +01:00
Darien Raymond 128a90b98b move link to transport 2018-11-03 12:36:29 +01:00
Darien Raymond f7b96507f9 simplify buffer extension 2018-11-02 21:34:04 +01: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 a5dcb0f13e refactor dependency resolution 2018-10-21 10:27:13 +02:00
Darien Raymond dcae6c63dd move size stats writer into vio 2018-10-15 09:03:40 +02:00
Darien Raymond 33becfe553 comments 2018-10-15 08:51:24 +02:00
Darien Raymond 595f3d685e merge user info inbound metadata 2018-10-15 08:36:50 +02:00
Darien Raymond d730637239 Require Type() for Feature 2018-10-12 23:57:56 +02:00
Darien Raymond b4821c5ed5 move policy and dnsClient 2018-10-11 22:34:31 +02:00
Darien Raymond 273342d0b9 move stats and inbound to features directory 2018-10-11 21:14:53 +02:00
Darien Raymond b6dc31d3fe first part to move feature interfaces into dedicated directory 2018-10-11 20:43:37 +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 00ea6e3cb2 update protobuf generated files 2018-09-30 18:39:28 +02:00
Darien Raymond 94b880d060 move session based info into session package 2018-09-18 23:09:54 +02:00