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

5684 Commits

Author SHA1 Message Date
Shelikhoo
6925870600
Fix forced outbound tag not set correctly 2021-02-28 19:57:21 +00:00
Shelikhoo
5f3851df39
Fix dependency cycle caused by core import in internet package 2021-02-28 19:10:38 +00:00
Shelikhoo
dd51d32250
Added Transport Layer Chained Proxy Support 2021-02-28 18:47:31 +00:00
Shelikhoo
8980cf2fcc
Regenerate protobuf for transport layer chain proxy 2021-02-28 17:52:16 +00:00
Shelikhoo
aaa55fc9d2
Add definition for transport layer chained proxy 2021-02-28 17:50:45 +00:00
Kid
d2a4e6bc47
Add /opt to assets location (#715) 2021-02-27 17:09:48 +08:00
dependabot[bot]
9fd5cdd8a8
Chore: bump github.com/miekg/dns from 1.1.39 to 1.1.40 (#712)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-26 13:42:36 +08:00
dependabot[bot]
2e1cdd52e9
Chore: bump google.golang.org/grpc from 1.35.0 to 1.36.0 (#711)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-26 11:29:51 +08:00
GitHub Action
8eb5996128 update geoip, geosite 2021-02-26 00:10:25 +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
4fb792fbd6
Chore: update golangci-lint & workflow (#704) 2021-02-24 14:22:37 +08:00
dependabot[bot]
bcbb96657c
Chore: bump github.com/miekg/dns from 1.1.38 to 1.1.39 (#702)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-24 14:21:29 +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
efb963237c
Fix: go generate command for Go v1.16 (#695)
* Fix: go generate command for Go v1.16
* Chore: ignore go generate binaries
* Chore: regenerate mock files
* Chore: update dependencies
2021-02-20 20:43:19 +08:00
dependabot[bot]
1f0d842060
Chore: bump actions/stale from v3.0.16 to v3.0.17 (#690) 2021-02-19 13:47:01 +08:00
Loyalsoldier
a545bfe2c8
Feat: use Go v1.16 & support Apple Silicon (#686) 2021-02-19 13:24:19 +08:00
GitHub Action
6524e52439 update geoip, geosite 2021-02-19 00:10:15 +00:00
Loyalsoldier
0000b60a36
Chore: update dependencies (#681) 2021-02-17 06:49:41 +08:00
Loyalsoldier
4aa536292e
Fix: codeql workflow alert (#682) 2021-02-17 06:36:02 +08:00
Loyalsoldier
612bf6a65d
Chore: update LICENSE year (#680) 2021-02-17 05:27:52 +08:00
Loyalsoldier
aa1cc3da0a
Chore: refine .gitignore (#679) 2021-02-17 05:23:08 +08:00
Loyalsoldier
07a63bc901
Chore: refine workflows (#678) 2021-02-17 05:16:31 +08:00
Loyalsoldier
f94dd11a8c
Chore: change module name (#677) 2021-02-17 04:31:50 +08:00
dependabot[bot]
0957442e01
Chore: bump golangci/golangci-lint-action from v2.3.0 to v2.4.0 (#674)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from v2.3.0 to v2.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2.3.0...544d2efb307b3f205f34886f2787046abe7fb26e)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-15 15:49:24 +08:00
GitHub Action
f4f4e4280d update geoip, geosite 2021-02-12 00:09:59 +00:00
Loyalsoldier
afcbb4feb8
Chore: update dependencies (#671) 2021-02-11 15:14:18 +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
dependabot[bot]
51af372bed
Chore: bump actions/cache from v2 to v2.1.4 (#659)
Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 14:56:22 +08:00
dependabot[bot]
986d3c44fa
Chore: bump actions/stale from v3.0.15 to v3.0.16 (#660)
Bumps [actions/stale](https://github.com/actions/stale) from v3.0.15 to v3.0.16.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.15...9d6f46564a515a9ea11e7762ab3957ee58ca50da)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-08 14:55:16 +08:00
GitHub Action
108546a8cd update geoip, geosite 2021-02-05 00:10:02 +00:00
dependabot[bot]
ee673062af
Chore: bump github.com/miekg/dns from 1.1.37 to 1.1.38 (#652) 2021-02-02 14:29:17 +08:00
dependabot[bot]
440509f930
Chore: bump github.com/miekg/dns from 1.1.35 to 1.1.37 (#647)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.35 to 1.1.37.
- [Release notes](https://github.com/miekg/dns/releases)
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.35...v1.1.37)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-01 21:32:45 +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
dependabot[bot]
74a8e0c71a
Chore: bump github.com/pires/go-proxyproto from 0.4.1 to 0.4.2 (#643)
Bumps [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](https://github.com/pires/go-proxyproto/compare/v0.4.1...v0.4.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-29 17:14:42 +08:00
GitHub Action
45df9b9fdf update geoip, geosite 2021-01-29 00:14:37 +00:00
Loyalsoldier
08b0abe675
Chore: refine issue templates (#630) 2021-01-28 09:08:38 +08:00
dependabot[bot]
0b9a5443f7
Chore: bump google.golang.org/grpc from 1.34.1 to 1.35.0 (#606)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.34.1 to 1.35.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.34.1...v1.35.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 18:26:54 +08:00
dependabot[bot]
0d15e93917
Chore: bump actions/stale from v3.0.14 to v3.0.15 (#632) 2021-01-25 15:27:06 +08:00
GitHub Action
be14c6b46e update geoip, geosite 2021-01-22 00:41:07 +00:00
dependabot[bot]
daa87de9ea
Chore: bump github.com/pires/go-proxyproto from 0.4.0 to 0.4.1 (#623)
Bumps [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](https://github.com/pires/go-proxyproto/compare/v0.4.0...v0.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-21 16:14:03 +08:00
DarthVader
de618121ad
Refactor: A faster DomainMatcher implementation (#587)
* a faster DomainMatcher implementation

* rename benchmark name

* fix linting errors
2021-01-20 15:53:07 +08:00
dependabot[bot]
c89aae1380
Chore: bump github.com/stretchr/testify from 1.6.1 to 1.7.0 (#607)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.1...v1.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-19 18:12:32 +08:00
dependabot[bot]
ef1f0a3ac3
Chore: bump github.com/pires/go-proxyproto from 0.3.3 to 0.4.0 (#618)
Bumps [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) from 0.3.3 to 0.4.0.
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](https://github.com/pires/go-proxyproto/compare/v0.3.3...v0.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-19 18:11:01 +08:00