1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
Commit Graph

1397 Commits

Author SHA1 Message Date
Shelikhoo
690b4924ae add packetaddr support for socks 2022-01-03 15:55:18 +00:00
Shelikhoo
79726111e3 add packet encoding support in simplified socks5 server config: auto generated 2022-01-03 15:55:18 +00:00
Shelikhoo
e7ffcfd4f6 add packet encoding support in simplified socks5 server config 2022-01-03 15:55:18 +00:00
Shelikhoo
8bf3da7c7f add socks packetaddr config 2022-01-03 15:55:18 +00:00
Shelikhoo
ac65036808 refactor UDP dispatcher to support fullcone dispatcher 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
Shelikhoo
9f6c65eeef
remove time based check in VMess MD5 decommission enforcement 2022-01-02 15:06:47 +00:00
Machtergreifung
ef58fde0ba
Update Vmess Error Warnings (#1492) 2021-12-27 14:28:11 +08:00
Bo He
b057a37fd6
fix some typo (#1482) 2021-12-27 12:33:08 +08:00
Loyalsoldier
31a10d5e0f
Fix: lint (#1449) 2021-12-06 21:22:11 +08:00
Shelikhoo
144a7929d8
Fix DoS attack vulnerability in CommandSwitchAccountFactory 2021-12-05 19:40:10 +00:00
Loyalsoldier
dce8764fd7
Lint: fix lint (#1427)
* Lint: replace golint with revive
* Lint: fix lint
2021-11-27 17:16:41 +08:00
Loyalsoldier
43447aa2e4
Chore: format code to fix lint (#1426) 2021-11-27 14:32:07 +08:00
世界
a66bb28aee
Reformat code 2021-10-28 18:34:19 +08:00
世界
cdb14de63e
Apply timeout to dns outbound (#1330)
Cherry-pick from 7b0699e8a5
2021-10-20 23:22:42 +01:00
世界
7d78683d6f
Send shadowsocks handshake with payload if available (#1292) 2021-09-27 22:14:11 +01:00
秋のかえで
908408dd45
Fix: Trojan fallback (#1286) 2021-09-27 22:13:25 +01:00
世界
f383f896ed
Add disableFallbackIfMatch dns option 2021-09-27 22:10:54 +01:00
世界
9ee66f7efe
Add socks4/4a support 2021-09-27 21:54:29 +01:00
Shelikhoo
cb5875fe62
fix incomplete revert for name change 2021-09-13 17:01:09 +01:00
Shelikhoo
a7eae67723
add back "door" to dokodemo-door's name
kslr said that without door it would lose its spirit
2021-09-13 16:55:43 +01:00
秋のかえで
a8ff0a6371
fix: VLESS simplified config inbound user account 2021-09-08 19:38:14 +01:00
秋のかえで
35ba772e6e
feat: add Dokodemo simplified config 2021-09-07 13:51:05 +01:00
秋のかえで
383bd4ce62
feat: add network to Shadowsocks simplified config 2021-09-07 13:50:47 +01:00
秋のかえで
6d7220bd6c
feat: add Loopback simplified config 2021-09-07 13:50:34 +01:00
秋のかえで
954dab8eaf
feat: refine Trojan simplified config 2021-09-07 13:50:20 +01:00
秋のかえで
679d713b89
feat: add Shadowsocks simplified config 2021-09-07 13:50:06 +01:00
秋のかえで
b4997170dc
feat: add HTTP simplified config 2021-09-07 13:49:22 +01:00
秋のかえで
ebe0964586
feat: add Blackhole simplified config 2021-09-05 16:41:39 +01:00
秋のかえで
82c3972e49
feat: add DNS outbound simplified config 2021-09-05 16:40:53 +01:00
秋のかえで
dca7497978
feat: add Trojan simplified config 2021-09-05 16:40:40 +01:00
秋のかえで
9b681907c4
feat: add VLESS simplified config 2021-09-05 16:40:22 +01:00
Shelikhoo
8c57d03418
update register logic 2021-09-05 00:42:21 +01:00
Shelikhoo
653bbba843
use two-step register to register explicitly 2021-09-04 22:55:12 +01:00
Shelikhoo
40d75fab73
add simplified freedom outbound 2021-09-04 21:30:38 +01:00
Shelikhoo
38f9f1d07a
amend vmess socks simplified config to allow injection of implementation 2021-09-04 21:26:21 +01:00
Shelikhoo
8da2f5393d
add socks simplified config: auto generated file 2021-09-04 21:16:52 +01:00
Shelikhoo
5052181b8c
added vmess simplified config 2021-09-04 21:16:13 +01:00
Shelikhoo
6b15c7f04f
added socks simplified config 2021-09-04 21:16:01 +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
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
kslr
54a627c443
remove mtproto (rebased from aa24f9a638) 2021-09-04 11:05:36 +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
Shelikhoo
1409be04c2
regenerate protobuf files 2021-07-01 18:58:48 +01:00
Loyalsoldier
d7a202a705
Lint: update linter config & fix code style (#1089)
* Lint: update linter config
* Fix: code style
2021-06-22 22:36:23 +08:00
Shelikhoo
9a03b425c9
apply coding style 2021-06-22 12:56:35 +01:00
Shelikhoo
79174ab2a0
unified drain support for vmess and shadowsockets 2021-06-22 12:26:17 +01:00
Shelikhoo
c5357e1f00
Added experiment to avoid sending the termination signal 2021-06-22 12:26:08 +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
f71b45f3e7
Chore: fix typos (#878) 2021-04-09 09:47:36 +08:00
Shelikhoo
e413653b1d
show legacy warning only once 2021-04-05 18:55:44 +01:00
Shelikhoo
2604c7c375
Revert "move non-VMessAEAD warning to startup"
This reverts commit e87e3d6b
2021-04-05 18:50:07 +01:00
Loyalsoldier
ae840dca6f
Chore: refine test (#855)
copy from branch v5
2021-04-04 09:33:38 +08:00
kslr
e87e3d6b85 move non-VMessAEAD warning to startup 2021-04-02 22:19:52 +08:00
Loyalsoldier
b50d692128
Chore: update protobuf & dependencies (#844) 2021-04-02 21:48:27 +08:00
Loyalsoldier
c80a6df749
Chore: format code (#842) 2021-04-02 20:49:45 +08:00
Shelikhoo
d55d5423fb
use shadowsocket's bloomring for shadowsocket's replay protection 2021-04-01 21:01:39 +01:00
Shelikhoo
7f5bc447d9
iv check should proceed after decryption 2021-04-01 20:59:36 +01:00
Shelikhoo
b5e29ea14e
Rename to shadowsockets iv check 2021-04-01 20:59:35 +01:00
Shelikhoo
e4681e8cd3
added shadowsockets iv check for tcp socket 2021-04-01 20:59:35 +01:00
Shelikhoo
531cd29e20
use shadowsocket's bloomring for shadowsocket's replay protection 2021-04-01 20:59:30 +01:00
Loyalsoldier
3db3ba5872
Fix: remove AA header flag in DNS query (#817) 2021-03-23 15:49:20 +08: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
Loyalsoldier
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
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
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
e03947e6b0
Chore: update protobuf & dependencies (#748) 2021-03-08 05:12:27 +08:00
Shelikhoo
7dabfb755e
merge vmess zero encryption support 2021-03-04 00:12:37 +00:00
Loyalsoldier
49cf614346
Chore: update dependencies & protobuf (#728) 2021-03-03 17:31:53 +08:00
Shelikhoo
1368e92605
Imaginary Security Lever: zero: turn off all security on payload data 2021-03-01 15:39:52 +00:00
Xiaokang Wang
733c5dea88
Deprecate legacy VMess header with a planned decommission (#717) 2021-03-01 21:26:54 +08:00
yuhan6665
afb8385a7e
Feat: routing and freedom outbound ignore Fake DNS (#696)
Turn off fake DNS for request sent from Routing and Freedom outbound.
Fake DNS now only apply to DNS outbound.
This is important for Android, where VPN service take over all system DNS
traffic and pass it to core.  "UseIp" option can be used in Freedom outbound
to avoid getting fake IP and fail connection.

Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-02-23 10:17:20 +08:00
Shelikhoo
232ba8c26f
Apply coding style 2021-02-22 13:49:36 +00:00
Shelikhoo
9c9c45fe4f
Add Test for the KDF value 2021-02-22 13:25:12 +00:00
Shelikhoo
0024c6e028
Fix incorrect HMac Chaining, further checking needed 2021-02-22 13:20:36 +00:00
Loyalsoldier
a545bfe2c8
Feat: use Go v1.16 & support Apple Silicon (#686) 2021-02-19 13:24:19 +08: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
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
dyhkwong
d8bc41e653
support enforcing VMessAEAD via environment variable (#596)
* support enforcing VMessAEAD via env var

to prevent downgrade attack

* Add comments to make Codacy Production happy
2021-02-08 18:08:01 +08:00
Kslr
795a3f632d
Test: fix race issue (#598)
other "race" problems are only in the test, and so I deleted the detection
2021-01-11 20:50:58 +08:00
maskedeken
9f8cb8bc8b
Fix: trojan: do not panic when UDP dispatcher fails to write response (#599) 2021-01-11 17:13:59 +08:00
Kslr
42f0f5dfec
remove deprecate ciphers in shadowsocks (#566)
* remove deprecate ciphers in shadowsocks
2021-01-01 10:18:00 +08:00
database64128
29f16cd054
🎳 Refine socks5 server UdpAssociate response behavior (#523)
- Previously, without specifying the server IP, the remote address in the response to a UdpAssoicate command is `127.0.0.1`, which might break UDP for non-localhost clients.
- This commit changes it so that, localhost clients get responses with the corresponding loopback IP, non-localhost clients get responses with the corresponding `net.AnyIP` or `net.AnyIPv6`.
- The new behavior is also consistent with many other implementations. So the compatibility is guaranteed. It also makes specifying server IP optional.
2020-12-16 16:39:14 +08:00
database64128
0eccf52399
🧦 Fix socks client UDP outbound's wrong destination (#522)
- When you connect to a non-localhost socks5 server, in the response of a UdpAssociate from a socks5 server, the remote address may be `::` or `0.0.0.0`. The previous behavior is to connect to the remote address in the response, which obviously fails.
- This commit changes the behavior to dial to the outbound server's address when the remote address in the response is `::` or `0.0.0.0`.
- Rename `cmdUDPPort` to `cmdUDPAssociate` for clarity.
2020-12-16 04:23:40 +08:00
Loyalsoldier
5e99737c12
Fix: close response body (#484) 2020-12-03 16:07:41 +08:00
Loyalsoldier
8cb2db5321
Fix: security issues & overflow potentiality (#465) 2020-11-28 21:56:20 +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
2ac380788b
Some minor fixes (#433) 2020-11-20 01:02:52 +08:00
Chinsyo
32e0e6e484
Some minor fix (#430)
* fix typo pading to padding

* reorder common/buf/buffer.go code layout

* delete unused common/stack

Co-authored-by: Chinsyo <chinsyo@sina.cn>
2020-11-18 04:23:30 +08:00
Chinsyo
dc78733196
Refactor common/antireplay, unexport unnecessary public fields. (#422)
* rename AuthIDDecoderHolder private fields

* ignore unused return value more clear

* change PoolSwap to private fields

* refactor Unlock to defer

* use const capacity, reorder code layout

* replace mismatch field name poolX with type Filter

* change AntiReplayTime to private fileds, protect to modify

* rename lastSwapTime to lastSwap

* merge duplicate time.Now.
Since the current unit is in seconds, there is no need to repeat the call

* refine negate expression

* rename antiReplayTime to interval

* add docs

* fix lint stutter issue, rename antireplay.AntiReplayWindow to antireplay.ReplayFilter

* rename fileds m,n to poolA,poolB

* rename antireplay.go to replayfilter.go

* fix build issue

Co-authored-by: Chinsyo <chinsyo@sina.cn>
2020-11-17 21:05:26 +08:00
RPRX
f06ede1bc1
Fix stat 2020-11-12 08:45:03 +00:00
Arthur Morgan
e2392491d6
Add V2RAY_TROJAN_XTLS_SHOW (#391)
When using trojan, you can set the environment variable V2RAY_TROJAN_XTLS_SHOW=true to display the output of XTLS
2020-11-07 14:32:42 +00:00