v2fly/main/distro/all/all.go

69 lines
2.3 KiB
Go
Raw Normal View History

2016-12-16 22:38:58 +00:00
package all
import (
// The following are necessary as they register handlers in their init functions.
2018-02-11 22:28:42 +00:00
// Required features. Can't remove unless there is replacements.
_ "v2ray.com/core/app/dispatcher"
2018-02-11 22:28:42 +00:00
_ "v2ray.com/core/app/proxyman/inbound"
_ "v2ray.com/core/app/proxyman/outbound"
2018-03-31 08:30:12 +00:00
// Default commander and all its services. This is an optional feature.
2018-02-11 22:28:42 +00:00
_ "v2ray.com/core/app/commander"
2018-02-14 21:00:15 +00:00
_ "v2ray.com/core/app/log/command"
2018-02-11 22:28:42 +00:00
_ "v2ray.com/core/app/proxyman/command"
2018-03-31 08:30:12 +00:00
_ "v2ray.com/core/app/stats/command"
2018-02-11 22:28:42 +00:00
// Other optional features.
2017-12-19 22:55:09 +00:00
_ "v2ray.com/core/app/dns"
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 10:18:52 +00:00
_ "v2ray.com/core/app/dns/fakedns"
2017-12-19 22:55:09 +00:00
_ "v2ray.com/core/app/log"
_ "v2ray.com/core/app/policy"
2018-10-27 22:03:11 +00:00
_ "v2ray.com/core/app/reverse"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/app/router"
2018-03-31 08:30:12 +00:00
_ "v2ray.com/core/app/stats"
2016-12-16 22:38:58 +00:00
2018-02-11 22:28:42 +00:00
// Inbound and outbound proxies.
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/proxy/blackhole"
2019-02-06 16:06:03 +00:00
_ "v2ray.com/core/proxy/dns"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/proxy/dokodemo"
_ "v2ray.com/core/proxy/freedom"
_ "v2ray.com/core/proxy/http"
2018-07-04 15:48:48 +00:00
_ "v2ray.com/core/proxy/mtproto"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/proxy/shadowsocks"
_ "v2ray.com/core/proxy/socks"
_ "v2ray.com/core/proxy/trojan"
2020-07-28 15:00:23 +00:00
_ "v2ray.com/core/proxy/vless/inbound"
_ "v2ray.com/core/proxy/vless/outbound"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/proxy/vmess/inbound"
_ "v2ray.com/core/proxy/vmess/outbound"
2018-02-11 22:28:42 +00:00
// Transports
2018-04-09 18:45:23 +00:00
_ "v2ray.com/core/transport/internet/domainsocket"
2018-03-01 20:10:45 +00:00
_ "v2ray.com/core/transport/internet/http"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/transport/internet/kcp"
2018-11-21 21:03:00 +00:00
_ "v2ray.com/core/transport/internet/quic"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/transport/internet/tcp"
_ "v2ray.com/core/transport/internet/tls"
_ "v2ray.com/core/transport/internet/udp"
2016-12-22 23:30:46 +00:00
_ "v2ray.com/core/transport/internet/websocket"
2016-12-16 22:38:58 +00:00
2018-02-11 22:28:42 +00:00
// Transport headers
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/transport/internet/headers/http"
_ "v2ray.com/core/transport/internet/headers/noop"
_ "v2ray.com/core/transport/internet/headers/srtp"
2018-05-25 15:16:15 +00:00
_ "v2ray.com/core/transport/internet/headers/tls"
2016-12-16 22:38:58 +00:00
_ "v2ray.com/core/transport/internet/headers/utp"
2017-01-03 21:46:22 +00:00
_ "v2ray.com/core/transport/internet/headers/wechat"
2018-08-27 19:52:25 +00:00
_ "v2ray.com/core/transport/internet/headers/wireguard"
// JSON config support. Choose only one from the two below.
// The following line loads JSON from v2ctl
// _ "v2ray.com/core/main/json"
// The following line loads JSON internally
_ "v2ray.com/core/main/jsonem"
2018-04-09 09:43:13 +00:00
// Load config from file or http(s)
_ "v2ray.com/core/main/confloader/external"
2016-12-16 22:38:58 +00:00
)