Commit Graph
386 Commits
Author SHA1 Message Date
Xiaokang Wang (Shelikhoo)andGitHub b1ef737d48 Add TLSMirror looks like TLS censorship resistant transport protocol as a developer preview transport (#3437)
* Add tlsmirror server processing routine

* Add tlsmirror server processing routine: generated

* Add tlsmirror server handshake capture

* it runs version~

* add draining copy for handshake

* refactor out base tls mirror connection

* tls mirror server side base

* add random field extraction

* add tls like encryption

* add tls like encryption (generated)

* add server side implementation for tlsmirror

* apply coding style: tlsmirror

* fix typo in mirrortls mirror crypto

* add client initial implementation for tls mirror

* add traffic generator implementation for tlsmirror

* add client processing of traffic generator originated traffic

* add embedded traffic generator support to mirrortls client

* override security setting of traffic generator if appropriate

* override security setting of traffic generator if appropriate

* apply request wait time for traffic generator

* add unsafe keyword required for linkname

* fix outbound manager registration for traffic ingress at tlsmirror client

* initial works at sticking packets together

* fix traffic generator's traffic goto logic

* fix get client and server random

* fix applying primary key

* fix log error handling for handshake random retrieval

* fix nonce generation and key derivation logic

* fix: add readPipe channel to client and server connection handlers

* fix: use detached context for persistent mirror TLS dialer

* fix: ensure proper closure of connections on context cancellation

* fix: proper detection of traffic generator originated connection

wait for connection ready before sending payload

* fix coding style
2025-07-03 11:33:16 +01:00
Xiaokang Wang (Shelikhoo)andGitHub 78cd513b82 Add Persistent Storage Support to V2Ray (#3300)
* update protogen to strip unused part

* add persistent storage support

* fix coding style

* update linter setting

* update github integration
2025-02-05 20:36:40 +00:00
Shelikhoo 3ee9045697 chore: regenerate protos 2025-02-02 13:57:34 +00:00
Shelikhoo cc77e90254 Add subscription manager 2023-11-26 10:55:27 +00:00
VigilansandXiaokang Wang (Shelikhoo) ce7dc23446 Apply DomainStrategy to outbound target 2023-11-19 00:23:31 +00:00
Shelikhoo cb84b28de4 Update generated protobuf files to v1.31.0 2023-10-24 19:50:30 +01:00
Seena FallahandGitHub 442eb44f74 outbounds: remove unused nil check for GetDefaultHandler (#2457)
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2023-10-21 08:43:09 +08:00
Shelikhoo 69ab87239a add implementation for transport environment and network env 2023-05-29 23:55:43 +01:00
VigilansandShelikhoo 882a363b85 DomainStrategy support for all outbounds 2023-02-19 13:34:15 +00:00
Shelikhoo 001aace748 Fix Server Name not Supplied to Security Engine for TCP Transport 2023-01-14 15:27:16 +00:00
Shelikhoo de55f3a675 Use security engine for (tls like) security client without transport 2022-12-24 21:52:23 +00:00
Shelikhoo 137cd7093c chore: regenerate protobuf file 2022-09-06 20:36:27 +01:00
Shelikhoo 0f2da63f0c fix lint warnings in packetaddr 2022-01-03 15:55:18 +00:00
Shelikhoo c3b51710de disable fullcone capture packetaddr capture on connection with forward proxy 2022-01-03 15:55:18 +00:00
Shelikhoo c4f850f1a9 fullcone bug fixes 2022-01-03 15:55:18 +00:00
Shelikhoo 552a15085d add packet addr support in outbound handler 2022-01-03 15:55:18 +00:00
Shelikhoo 3ef7feaeaf update version: auto replacement to v5 path 2022-01-02 15:16:23 +00:00
XGFanandGitHub e3610870d1 replace same tag default outbound handler (#1437)
* replace old default handler with same tag

Signed-off-by: Guofan Xu <xuguofan@live.com>

* add warning log when replace outbound

* fix lint

Signed-off-by: Guofan Xu <xuguofan@live.com>
2021-12-11 11:22:38 +08:00
世界 a66bb28aee Reformat code 2021-10-28 18:34:19 +08:00
OvearandShelikhoo 36df3b035c Remove unnecessary log.
(cherry picked from commit b3e0d54630)
2021-09-30 15:30:21 +01:00
OvearandShelikhoo 9a8e113ad3 Fix: Remove udp conn twice
(cherry picked from commit 75eead5a6e)

See Also: https://github.com/v2fly/v2ray-core/pull/1305
https://github.com/v2fly/v2ray-core/issues/1297
2021-09-30 15:29:51 +01:00
Shelikhoo 434d9e8700 add grpc service register 2021-09-07 14:43:45 +01:00
Shelikhoo e0700ccc4b regenerate protobuf file 2021-09-04 11:26:13 +01:00
Shelikhoo 1531cb0ca4 update protobuf version 2021-09-04 11:13:51 +01:00
Shelikhoo a4e6fe5a94 reference google version of protobuf library 2021-09-04 11:13:31 +01:00
Shelikhoo ba2dd5995d replace TypedMessage with anypb.Any 2021-09-04 11:13:28 +01:00
JebbsandShelikhoo b05a469488 v5: Remove v2ctl & wv2ray (rebased from 7c1ab06206) 2021-09-04 11:09:55 +01:00
database64128andGitHub 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
Shelikhoo 1409be04c2 regenerate protobuf files 2021-07-01 18:58:48 +01:00
LoyalsoldierandGitHub 6f8979d017 Style: format code by gofumpt (#1022) 2021-05-20 05:28:52 +08:00
LoyalsoldierandGitHub 1cb9fd2999 Chore: little refinements (#973) 2021-05-05 07:28:09 +08:00
Shelikhoo 03b0c8efd9 use correct function for to context 2021-05-04 20:41:09 +01:00
Shelikhoo 758290314f fix context related test issue 2021-05-04 20:34:06 +01:00
Shelikhoo 620d8f1fb5 remove context public interface 2021-05-04 20:22:13 +01:00
Shelikhoo a553ccc4c4 report transportation error to observer 2021-04-08 23:17:00 +01:00
LoyalsoldierandGitHub 9e9173acb4 Chore: update protobuf & dependencies (#793)
* Chore: update protobuf
* Chore: regenerate mock files
* Chore: update dependencies
* Chore: use Go v1.16.2 and later
2021-03-18 12:17:26 +08:00
LoyalsoldierandGitHub e03947e6b0 Chore: update protobuf & dependencies (#748) 2021-03-08 05:12:27 +08:00
Shelikhoo b585f2283a fixing misbehaving code in mux that do not propagate context 2021-03-06 14:31:46 +00:00
Shelikhoo 0010783191 Merge chained proxy with transport support 2021-03-03 23:27:26 +00:00
LoyalsoldierandGitHub 49cf614346 Chore: update dependencies & protobuf (#728) 2021-03-03 17:31:53 +08:00
Shelikhoo 616b0d122e Fix for context with empty content 2021-02-28 20:42:32 +00:00
Shelikhoo dd51d32250 Added Transport Layer Chained Proxy Support 2021-02-28 18:47:31 +00:00
LoyalsoldierandGitHub f94dd11a8c Chore: change module name (#677) 2021-02-17 04:31:50 +08:00
LoyalsoldierandGitHub 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
ChinsyoandGitHub 2ac380788b Some minor fixes (#433) 2020-11-20 01:02:52 +08:00
luciferandGitHub 770b994337 Refine unix domain socket (#367) 2020-10-29 07:30:38 +00:00
LoyalsoldierandGitHub f17063a08a Update vprotogen (#366)
* Refine vprotogen
* Regenerate pb.go files
2020-10-29 09:27:05 +08:00
loyalsoldier 784775f689 Refine code according to golangci-lint results 2020-10-11 19:22:46 +08:00
LoyalsoldierandGitHub 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