1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-09 03:37:37 -05:00
Commit Graph

27 Commits

Author SHA1 Message Date
Shelikhoo
488f9845c6
added fake dns + others matching logic 2021-04-10 13:40:15 +01:00
Shelikhoo
e161d6cc1f
added parsing of browser forwarder config 2021-03-20 22:03:45 +00:00
Xiaokang Wang
0e5e5164ff
loopback outbound, allow you to redirect connection to the dispatcher again (#770)
* Added Loop back proxy

* Added json processing for lo proxy

* Fix bug for lo proxy

* Fix bug for lo proxy

* rename the outbound name

* Loopback: update naming and fix lint issues

* Chore: change lo to loopback

Co-authored-by: kslr <kslrwang@gmail.com>
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-03-13 17:25:56 +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
b68f943c78
Fix lint according to golangci-lint (#439) 2020-11-22 05:05:01 +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
Chinsyo
231f5bf024
Add missing deprecation notice to deprecated code (#437) 2020-11-20 15:18:44 +08:00
lucifer
770b994337
Refine unix domain socket (#367) 2020-10-29 07:30:38 +00:00
ekenchan
3fc985dd0e
Add trojan over xtls support (#334)
* Add trojan over xtls support

* Add comments

* improve PR quality

* improve PR quality

* add xtls-rprx-origin-udp443 and xtls-rprx-direct-udp443

Co-authored-by: Eken Chan <maskedeken@yahoo.com>
2020-10-20 10:44:31 +00:00
loyalsoldier
784775f689
Refine code according to golangci-lint results 2020-10-11 19:22:46 +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
vcptr
0fd0c374c1 fix config compatibility with old inbound/inboundDetors/out 2020-03-24 21:52:03 +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
5ae47d45c2 multiconf with -confdir arg 2019-12-31 11:45:19 +08:00
vcptr
3b4a4607e5 fix test case; outbound with tail appends 2019-12-15 00:14:46 +08:00
vcptr
904db6bd61 mconfig subcommand ready 2019-12-14 23:48:56 +08:00
vcptr
7b289d16cf conf obj override method 2019-12-14 23:48:56 +08:00
vcptr
59e3a2a67c add comments to exported func 2019-11-26 13:24:46 +08:00
vcptr
6ef77246ab add DOH dns client 2019-11-25 15:41:36 +08:00
vcptr
901e4837ad logger module start firstly 2019-11-19 14:06:20 +08:00
wuxiaolong
97764114ea Support http outbound 2019-07-24 09:15:05 +08:00
Darien Raymond
4eb2b5e607
merge ext into core 2019-02-10 19:04:11 +01:00