1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-11 10:20:42 +00:00
Commit Graph

81 Commits

Author SHA1 Message Date
mydogshitgold
5893d2f3a6
feat: add option to override destination of access log
When SystemPolicy.OverrideAccessLogDest is enabled, destination host
in access log will be replaced with sniffed host. (#866)
2023-02-19 12:26:33 +00:00
Vigilans
ac0d9480bd
[app/dispatcher] [proxy/dns] Support domain string validation (#2188) 2022-12-10 17:07:59 +08:00
秋のかえで
3c0aff73e8
Fix: logic of domain override 2022-11-29 09:55:55 +08:00
秋のかえで
82c42fc32c
Fix: HTTP sniff 2022-11-29 09:27:28 +08:00
Hork
1b0e046c99 Fix erroneous prefix checking 2022-09-07 10:51:00 +01:00
Shelikhoo
3ef7feaeaf
update version: auto replacement to v5 path 2022-01-02 15:16:23 +00:00
Bo He
f2b1b79283
Fix: raising no route matched log level to Warning (#1424) 2021-11-27 13:11:38 +08:00
世界
dbc26775c9
Add quic sniffer 2021-11-13 14:21:57 +00:00
Shelikhoo
e38839aaf9
remove duplicated targeted dispatch 2021-09-04 11:12:35 +01:00
Shelikhoo
718d6f32bf
update coding style 2021-09-04 11:12:04 +01:00
Jebbs
fa0cf6db26
v5: Health Check & LeastLoad Strategy (rebased from 2c5a714903)
Some changes will be necessary to integrate it into V2Ray
2021-09-04 11:11:45 +01:00
Jebbs
b05a469488
v5: Remove v2ctl & wv2ray (rebased from 7c1ab06206) 2021-09-04 11:09:55 +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
6f8979d017
Style: format code by gofumpt (#1022) 2021-05-20 05:28:52 +08:00
Shelikhoo
488f9845c6
added fake dns + others matching logic 2021-04-10 13:40:15 +01:00
Loyalsoldier
e46204f828
Chore: fix lint according to golangci-lint errors (#781)
* Chore: fix lint according to golangci-lint errors
* Chore: regenerate pb.go files
2021-03-14 07:44:47 +08:00
Shelikhoo
867bbb429e
create session content in the context if do not exist yet 2021-03-06 14:33:20 +00: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
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
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
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
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
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