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

383 Commits

Author SHA1 Message Date
Shelikhoo
95ddd2a313
jsonpb loading 2021-09-04 11:13:30 +01:00
Shelikhoo
c119d8dc79
v2jsonpb full dump support 2021-09-04 11:13:30 +01:00
Shelikhoo
c187b6fb3e
v2jsonpb full dump 2021-09-04 11:13:30 +01:00
Shelikhoo
b36b434689
jsonpb format 2021-09-04 11:13:30 +01:00
Shelikhoo
28c36019b2
support v4 json pb output 2021-09-04 11:13:29 +01:00
Shelikhoo
2df4fa39e3
added jsonpb format support: auto generated 2021-09-04 11:13:29 +01:00
Shelikhoo
32374eb545
added jsonpb format support 2021-09-04 11:13:29 +01:00
Shelikhoo
ba2dd5995d
replace TypedMessage with anypb.Any 2021-09-04 11:13:28 +01:00
Shelikhoo
add375390e
move v4 configure support to own directory 2021-09-04 11:13:13 +01:00
Shelikhoo
c86ac3aca6
isolate dns settings synthesis: auto generated 2021-09-04 11:13:13 +01:00
Shelikhoo
b37755d111
isolate dns settings synthesis 2021-09-04 11:13:13 +01:00
Shelikhoo
3510ddb464
isolate log settings synthesis 2021-09-04 11:13:13 +01:00
Shelikhoo
72d2184dba
isolate router settings synthesis: auto generated file 2021-09-04 11:13:13 +01:00
Shelikhoo
39b3866774
isolate router settings synthesis 2021-09-04 11:13:11 +01:00
Shelikhoo
41b54ff61e
move buildable to cfg common 2021-09-04 11:12:36 +01:00
Shelikhoo
22f6b100ba
fix v4 json loader MultiObservatoryConfig 2021-09-04 11:12:35 +01:00
Shelikhoo
ab803000e7
bug fix for observer 2021-09-04 11:12:35 +01:00
Shelikhoo
6fd8e36a3b
adjust test with updated structure 2021-09-04 11:12:35 +01:00
Shelikhoo
2dc539cc70
add V4 json support for observer tag config 2021-09-04 11:12:34 +01:00
Shelikhoo
2cdad52334
add v4 json support for BurstObservatory & fix balancer reference 2021-09-04 11:12:33 +01:00
jebbs
a8dd708028
parse duration conf with time.Parse() 2021-09-04 11:12:04 +01:00
Shelikhoo
718d6f32bf
update coding style 2021-09-04 11:12:04 +01:00
Jebbs
7a0af318df
refine api, run command and merger (#766)
* mergers code optimize

* api log work with pipe

* remove inbounds/outbounds by tags
*fix rmo flag parse

* cmds description and message optimize
2021-09-04 11:11:45 +01:00
Jebbs
2523d77919
improve commands
(rebased from ebbf31f07e)
2021-09-04 11:11:45 +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
秋のかえで
dde9463275
V5: Add TOML Support (rebased from 36ba06837f) 2021-09-04 11:11:45 +01:00
Jebbs
ec1694beb1
fix commands issues (#492)
* fix api commands output

* remove unused code

* fix convert always has -r

* update merge err to locate failed file
2021-09-04 11:09:58 +01:00
young-zy
12dfbc78a3
Update protobuf version (rebased from 6d25d51519)
Some change is not adopted since it would break the code base. These changes will be reintroduced at a later date.
2021-09-04 11:09:58 +01:00
Jebbs
b05a469488
v5: Remove v2ctl & wv2ray (rebased from 7c1ab06206) 2021-09-04 11:09:55 +01:00
Jebbs
557b0c3353
V5: YAML support (rebased from 9367e9b1f2) 2021-09-04 11:05:52 +01:00
kslr
54a627c443
remove mtproto (rebased from aa24f9a638) 2021-09-04 11:05:36 +01:00
Jebbs
8c78712841
v5: New multi-json loader (rebased from ff59bd37ce) 2021-09-04 11:05:20 +01:00
Jebbs
a96e093432
go style commands, merge v2ctl commands, v5 oriented (rebased from 521120d196) 2021-09-04 11:05:19 +01:00
Shelikhoo
a53fd35205
separate client ca and server ca
This is designed to prevent a server from being attacked with a client with a certificate issued by a trusted system CA.
Some commercial CA actually can issue certificate to individual to proof their identity. The server should not accept these certs as a valid client certificates.
2021-09-01 22:34:13 +01:00
ydx
fb665ee94a
add client certificate verify (#1169) 2021-09-01 21:12:03 +01:00
Loyalsoldier
5794a97708
Fix: JSON tag case (#1212)
JSON unmarshal is case insensitive in Golang
2021-08-19 21:16:54 +08:00
ihotte
8f429c35cb
Fix: observatory log & JSON config(#1211)
Co-authored-by: ihotte <ihotte@yeah.net>
2021-08-19 13:40:47 +08:00
Loyalsoldier
639148dda4
Refinement: LRU (#1142) 2021-08-10 11:08:45 +08:00
Shelikhoo
91a2286064
apply coding style 2021-07-01 19:02:27 +01:00
Shelikhoo
54fc21e537
add custom probe interval for observer 2021-06-30 19:33:37 +01:00
Shelikhoo
4773e3a1ed
add custom probe URL support for observatory 2021-06-30 17:47:29 +01:00
Shelikhoo
0822160008
VMess AEAD based packet length 2021-06-22 12:26:01 +01:00
Loyalsoldier
6f8979d017
Style: format code by gofumpt (#1022) 2021-05-20 05:28:52 +08:00
Loyalsoldier
b57ebd5c1c
vFormat: use gci instead of customized goimports (#1020) 2021-05-19 19:59:46 +08:00
ght99
faee88163c
Fix: v2ctl failed to get geodata loaders (#1014)
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-05-17 00:44:08 +08:00
Loyalsoldier
218f27c9c1
Feat: vformat supports multi-core processing (#996) 2021-05-11 09:05:43 +08:00
Loyalsoldier
a771e3401a
Fix: lint error (#995) 2021-05-11 08:36:06 +08:00
Shelikhoo
31a7fb503c
update TCPKeepAliveInterval type to allow expression disable 2021-05-06 15:33:35 +01:00
Shelikhoo
77a573caf1
refactor test for loader benchmark 2021-05-05 13:50:56 +01:00
loyalsoldier
fa85afc920
Feat: add geodata loader benchmark 2021-05-05 13:22:01 +01:00
Loyalsoldier
1cb9fd2999
Chore: little refinements (#973) 2021-05-05 07:28:09 +08:00
Shelikhoo
d6abddc7f5
rename the field to keep lint happy 2021-05-04 22:55:39 +01:00
Shelikhoo
44514ebc1a
Merge branch 'dev-wsearlydatadiverse' 2021-05-04 22:50:06 +01:00
Shelikhoo
8d4b4201f8
add json parse rule for tcp keep alive interval 2021-05-04 22:37:38 +01:00
rurirei
2129c6e1e9
feat: update bootstrap_dns_android (#966)
* update with non_specified network

* remove wrongs

* add alternative bootstrapDialer

* do test

* Update dns_bootstrap_android_test.go

* example of alternative dialer

* public method

* move const

* Update dns_bootstrap_android_test.go

* no duplicated

* Rename infra/conf/dns_bootstrap_android.go to transport/internet/system_dns_android.go

* Update system_dns_android.go

* Update and rename infra/conf/dns_bootstrap_android_test.go to transport/internet/system_dns_android_test.go

* no imports

* Update system_dns_android.go

* Update system_dns_android_test.go

* create systemDNS

* Create system_dns_android.go

* Update system_dialer.go

* call Resolver on systemDialer

* create system_dns_test.go

* resolver.LookupIP params

* param fix

* noneed TestSystemDNSResolver

* revert: no specified resolver

* Delete system_dns.go

* android only

* android only test

* typo
2021-05-04 22:22:01 +01:00
Shelikhoo
1d7e497599
Added json configure file parsing of h2 transport 2021-05-04 20:32:27 +01:00
loyalsoldier
007a15bd79
fix 2021-05-04 19:21:46 +01:00
loyalsoldier
2bdc86049a
code style 2021-05-04 19:21:34 +01:00
loyalsoldier
40f8e82204
refine 2021-05-04 19:19:43 +01:00
Shelikhoo
3ba9a5b4f5
Refine geodata related tests (#967)
(cherry picked from commit 7805ca2ac1)
2021-05-04 19:13:52 +01:00
Shelikhoo
bf0e7e35c8
move geo loader conf to environment variable 2021-05-04 19:08:18 +01:00
Shelikhoo
19d1ff9003
apply coding style 2021-05-04 19:08:15 +01:00
Shelikhoo
4610c5e23f
memconservative geofile loader 2021-05-04 19:08:06 +01:00
Shelikhoo
0f1fac84ca
refactor configure file loader for geo loader and v5 2021-05-04 19:07:58 +01:00
Shelikhoo
9458963b5a
Revert "Refactor: memory-efficient geo file decoder (#934)"
This reverts commit 7e876709
2021-05-04 19:07:54 +01:00
Shelikhoo
ace2c44c2b
Revert "Refine geodata related tests (#967)"
This reverts commit 7805ca2a
2021-05-04 19:07:35 +01:00
Loyalsoldier
7805ca2ac1
Refine geodata related tests (#967) 2021-05-04 16:30:23 +08:00
Shelikhoo
40a7847d7f
update json configure for websocket header 2021-05-01 15:49:42 +01:00
Loyalsoldier
980fb59878
Fix: observatory starts with empty config & fails to close (#957) 2021-05-01 22:28:23 +08:00
秋のかえで
b68411f460
Fix: browserforwarder panics with empty config (#954)
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-05-01 20:50:30 +08:00
Loyalsoldier
625a15e03b
Chore: format code by new customized goimports (#950) 2021-05-01 11:15:39 +08:00
Loyalsoldier
0fe129de65
Infra: use customized goimports (#949) 2021-05-01 11:11:37 +08:00
Loyalsoldier
7e876709fe
Refactor: memory-efficient geo file decoder (#934) 2021-05-01 07:59:29 +08:00
Shelikhoo
95432b2131
fix:browser forwarder not supported by multi-json 2021-04-30 20:53:08 +01:00
Shelikhoo
347b0c3e85
fix:observatory not supported by multi-json 2021-04-30 15:25:24 +01:00
Loyalsoldier
a21e4a7deb
Fix: FakeDNS IPv6 & refine JSON unmarshal (#925) 2021-04-22 08:12:52 +08:00
QxQ
3a51c255eb
Update uuid.go 2021-04-18 15:38:04 +08:00
Shelikhoo
3138b3e815
removed tool to prepare for v5 2021-04-17 10:50:53 +01:00
Shelikhoo
0c6a2e06b9
added json loading of the PinnedPeerCertificateChainSha256 2021-04-16 23:52:49 +01:00
Shelikhoo
ebb720804d
refactored cert pin 2021-04-15 20:02:48 +01:00
Shelikhoo
29718735be
apply coding style 2021-04-15 19:02:57 +01:00
Shelikhoo
92b845a45b
added calculation of certificate hash as separate command and tlsping, use base64 to represent fingerprint to align with jsonPb 2021-04-15 19:01:55 +01:00
Shelikhoo
3cd145a6f0
fix not creating test dir in some environment 2021-04-13 18:15:06 +01:00
Shelikhoo
d7c9a98d76
apply coding style 2021-04-13 16:06:48 +01:00
Shelikhoo
8323add330
apply coding style 2021-04-13 15:50:29 +01:00
Shelikhoo
1e282944a6
apply coding style 2021-04-13 15:39:10 +01:00
Shelikhoo
f5d2ddedb4
Merge branch 'dev-fakednsimprovement' 2021-04-13 15:14:47 +01:00
Shelikhoo
6dcdd2afad
Merge branch 'dev-advloadblancer-2' 2021-04-13 15:09:32 +01:00
Loyalsoldier
7790d33185
Fix: v2ray.location.asset env not working (#889) 2021-04-12 10:01:30 +08:00
Shelikhoo
726f023a5d
fix incorrect service name 2021-04-12 01:18:20 +01:00
Loyalsoldier
31abe08c05
Chore: simplify DNS hosts struct (#888) 2021-04-11 12:46:02 +08:00
Loyalsoldier
bada0e48b4
Feat: DNS hosts support multiple addresses (#884) 2021-04-10 21:56:08 +08:00
Shelikhoo
488f9845c6
added fake dns + others matching logic 2021-04-10 13:40:15 +01:00
Shelikhoo
94ab10fce3
added json parser for multi fake dns pool 2021-04-10 00:08:50 +01:00
Loyalsoldier
3f40089caf
Feat: add disableFallback & skipFallback option for DNS (#864) 2021-04-09 10:35:26 +08:00
Shelikhoo
32f6af48d1
Added json loading for the observatory 2021-04-08 23:18:25 +01:00
Shelikhoo
fc2a37492a
rewrite the test case to confirm the new parsing rule 2021-04-08 23:18:25 +01:00
Shelikhoo
017a11cfd5
allow the loading of router strategy 2021-04-08 23:18:25 +01:00
Shelikhoo
459a914ab7
apply coding style 2021-04-08 23:18:23 +01:00
Shelikhoo
a42ef81ac0
finish remaining grpc observatory api 2021-04-08 23:17:00 +01:00
Shelikhoo
3a705cec5a
reflective api loader 2021-04-08 23:16:59 +01:00
Shelikhoo
71b2ff65f4
Remove unhelpful name 2021-04-08 23:16:59 +01:00
Shelikhoo
f518b63157
Direct reflective json loader 2021-04-08 23:16:59 +01:00
Shelikhoo
99f761a12e
V2Ray Service Loader 2021-04-08 23:16:59 +01:00
Loyalsoldier
10ca68f277
Feat: remove geo files from repo & refine tests (#869) 2021-04-07 03:08:03 +08:00
Loyalsoldier
3a50affa0a
Feat: add reverse match for GeoIP (#860) 2021-04-06 12:29:12 +08:00
Shelikhoo
6b542f59a9
shadowsocks iv check config file 2021-04-01 20:59:36 +01:00
loyalsoldier
a0c817888b
Chore: format code 2021-03-28 08:44:04 +08:00
loyalsoldier
24948c6520
Merge branch 'master' into dev-wsimprovement 2021-03-28 08:40:05 +08:00
Loyalsoldier
921c6d71ee
Feat: format code in one-key (#802) 2021-03-24 14:43:00 +08:00
Loyalsoldier
1454bed646
Feat: vprotogen refine logic (#820) 2021-03-24 13:03:14 +08:00
Loyalsoldier
389ff73a26
Feat: vprotogen adds version detector (#819)
* Feat: vprotogen adds version detector to block generation code from old protobuf version
* Chore: update .gitignore
2021-03-24 11:49:32 +08:00
Shelikhoo
6c1abd9c6a
added use browser forwarding setting to the websocket config 2021-03-20 22:05:02 +00:00
Shelikhoo
e161d6cc1f
added parsing of browser forwarder config 2021-03-20 22:03:45 +00:00
Loyalsoldier
e6aaa57def
Feat: add queryStrategy option for DNS (#794) 2021-03-19 15:55:18 +08:00
Loyalsoldier
7459e2c5ef
Fix: vprotogen loop dependency (#797)
* Chore: remove protoc-gen-gofast
* Fix: loop dependency
* Chore: regenerate VLESS pb.go file
* Fix: compare test
2021-03-18 18:32:40 +08:00
RPRX
00879c483e
Add grpcSettings & gunSettings to streamSettings 2021-03-17 10:09:07 +00:00
Loyalsoldier
933861a761
FakeDNS: use 198.18.0.0/15 as default IP pool (#779) 2021-03-15 16:47:10 +08:00
Loyalsoldier
88e1e25aa9
Chore: format import using goimports (#780) 2021-03-14 07:09:51 +08: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
RPRX
3b7ed982fb
Add grpcSettings (alias of gunSettings) 2021-03-11 16:01:57 +00:00
Xiaokang Wang
aaa9e788e7
Grpc Gun Transport (#757)
* introduce grpc transport structure

* fix package name inconsistency

* grpc gun transport dialer and listener

* add selective build tag

* add grpc:gun listener

* add grpc:gun config

* add generated files

* various bug fix for gun:grpc transport

* Cache dialed connections

* grpc:gun Use V2Ray Managed Dial function

* Update destination.pb.go

* Update gun.go

* GunSettings -> GunConfig

* gu -> gs

* add grpc alias

Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
Co-authored-by: kslr <kslrwang@gmail.com>
2021-03-11 16:46:17 +08:00
CalmLong
630ec22108
DNS: refine Android bootstrap DNS logic (#767) 2021-03-10 21:23:15 +08:00
Shelikhoo
e22cf451f4
Allow bulk definition of domain matcher at parent level 2021-03-05 18:37:32 +00:00
Shelikhoo
7dabfb755e
merge vmess zero encryption support 2021-03-04 00:12:37 +00:00
Shelikhoo
0010783191
Merge chained proxy with transport support 2021-03-03 23:27:26 +00:00
Shelikhoo
38b0f026fe
json parsing rule for domain matcher 2021-03-03 22:35:55 +00:00
Shelikhoo
1368e92605
Imaginary Security Lever: zero: turn off all security on payload data 2021-03-01 15:39:52 +00:00
Shelikhoo
dd51d32250
Added Transport Layer Chained Proxy Support 2021-02-28 18:47:31 +00:00
Loyalsoldier
9d13f99633
Chore: format file & change names of test cases (#707) 2021-02-24 17:12:44 +08:00
CalmLong
7ebf3afc31
Feat: add disableCache option for DNS (#705)
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-02-24 16:03:50 +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
CalmLong
3eb13868f2
Feature: android binary runtime default dns set 8.8.8.8:53 (#572)
ref https://github.com/golang/go/issues/8877
ref https://github.com/v2ray/v2ray-core/issues/1909
2021-01-02 15:48:13 +08:00
RPRX
4d2e782fbe
Disable session resumption by default (#569) 2021-01-01 17:01:14 +08:00
Kslr
42f0f5dfec
remove deprecate ciphers in shadowsocks (#566)
* remove deprecate ciphers in shadowsocks
2021-01-01 10:18:00 +08:00
Loyalsoldier
7a020d2d71
DNS & Routing: refine rule parsing process (#528) 2020-12-18 08:36:34 +08:00
dyhkwong
291eff1aa3
Refine Android build (#525)
Co-authored-by: ghost <noreply@example.com>
2020-12-17 08:50:13 +08:00
Loyalsoldier
166d1afee5
DNS: add clientip for specific nameserver (#504) 2020-12-12 07:15:29 +08:00
CalmLong
6858a7b0a7
Routing: consistent with domains key in DNS configuration (#502) 2020-12-11 21:16: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
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
Ye Zhihao
5b2a9e8769
API: Reflection Service Support (#435) 2020-11-20 01:57:31 +08:00
Xiaokang Wang
fb0aadeea9
Transfer VSign and related project to V2Fly and share under the same license as v2ray-core (#392)
* Move VSign to V2Fly

* Use transfered V2BuildAssist  project
2020-11-08 03:11:45 +08:00
RPRX
21739e6f38
32 -> 0 2020-11-02 11:00:08 +00:00
lucifer
770b994337
Refine unix domain socket (#367) 2020-10-29 07:30:38 +00:00
Loyalsoldier
f17063a08a
Update vprotogen (#366)
* Refine vprotogen
* Regenerate pb.go files
2020-10-29 09:27:05 +08:00
maskedeken
24f688cc20
Trojan Protocol Handler implements UserManager (#344)
* Trojan Protocol Handler implements UserManager

* Update validator.go

Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2020-10-22 04:01:26 +00:00