利用simple-dns解决dns污染问题

在mac机器上。

pip install twisted

git clone https://github.com/RicterZ/simple-dns simple-dns-by-ricterz

cd simple-dns-by-ricterz/simple-dns/

sudo python dns.py

项目地址:

https://github.com/RicterZ/simple-dns

(用不了多久)

-------

利用dnsproxy-by-zhengxinhn解决dns污染问题(这个不错)

git clone https://github.com/zhengxinhn/dnsproxy dnsproxy-by-zhengxinhn

cd dnsproxy-by-zhengxinhn

make

cd src

 

src目录里面生成了可执行文件dnsproxy

./dnsproxy -h

sudo ./dnsproxy -p 53 --remote-addr=8.8.8.8 --remote-port=53

会显示:

* runing at 53

* transport to 8.8.8.8:53,tcp

------------

 

利用dnsproxy-by-notzappy解决dns污染问题

 

git clone https://github.com/NotZappy/dnsproxy dnsproxy-by-NotZappy 

cd dnsproxy-by-NotZappy 

sudo python dnsproxy.py

会显示使用说明。

sudo python dnsproxy.py -p 53 --server=8.8.8.8

----------

利用dnsproxy-by-ccloli解决dns污染问题

Requirement

  • Node.js
    • v8.x: v8.10.0* or higher
    • v9.x: v9.1.0* or higher
    • v10.x or higher
npm install -g ccloli/DNSProxy

wget https://github.com/ccloli/DNSProxy/raw/master/config.sample.json

cat config.sample.json > dnsproxy-by-ccloli.json

修改dnsproxy-by-ccloli.json为如下内容:

// This is a sample of DNSProxy config file

// You can use this sample to create your config file

{

// DNSProxy server configuration

"settings": {

// should DNSProxy support TCP lookup from client?

"tcp": true,

// should DNSProxy support UDP lookup from client?

"udp": true,

// which IP to bind the DNSProxy server?

"host": "127.0.0.1",

// which port to listen the client request?

"port": 53,

// when to close upstream lookup if no data response?

"timeout": 5000 // ms

},

// available name server list

"servers": {

// set name server with a name

// you don't need to set name servers here

// but at least a `default` one is required

"default": {

// name server host

"host": "8.8.8.8",

// name server port

// if you emit port, it'll be `53`

"port": "53",

// name server protocol, `tcp`, `udp` or `tls`

// if you emit protocol, it'll be based on your request,

// if you request the server with UDP, then it'll be UDP,

// if you request the server with TCP, then it'll be TCP

"type": "tcp"

},

// another name server

// "tcp": {

// you can combine host and port as host

// "host": "127.0.0.1:53",

// don't set port again, or it'll overwrite the previous one

// "type": "tcp"

// },

"ipv6": {

// if you're using IPv6 server, quote IP address with []

// or it'll be parsed as combined host and port

"host": "[::1]:53"

},

// "tls": {

// DNS-over-TLS lookup is supported

// "host": "127.0.0.1",

// if you emit port, it'll be `853` for `tls`

// "port": "853",

// "type": "tls"

// },

// you can use a plain string instead of an object

// scheme is `<ip>[:<port = 53>][@<protocol>]`

"google-tcp": "8.8.8.8:443@tcp",

"google-ipv6": "[2001:4860:4860::8888]",

"cloudflare-tls": "1.1.1.1@tls",

// you can also use domain for TLS lookup,

// but please be aware that looking up the server IP is not

// controlled by DNSProxy but by libuv's operating system API,

// so the IP is probably not what you want (you know what I mean)

"quad9-tls": "dns.quad9.net@tls"

},

// extend rule parsers

// you can import some other parsers written by you or some other guy

// then you can use them in `rules`

// note if you're using Windows, use slash (/) or two backslashes (\\)

"extend-parsers": [

"path/to/parser.js",

"path\\to\\another\\parser.js",

// you can use vertical bar (|) after path to rename it, it's useful

// if you don't know its name or another parser uses the same name

// the original name of parser will be replaced by your new name

"path/to/renamed/parser.js|new-name",

// you can use `npm:` before path to import from a npm package

// you can use its original name to use the parser

// or use `npm:<package-name>` to use the parser

"npm:dnsproxy-npm-parser",

// you can also rename a npm package to overwrite its original name

// e.g. you can use either `npm:dnsproxy-npm-another-parser` or

// `another-parser` to use the parser

"npm:dnsproxy-npm-another-parser|another-parser"

],

// look up rules

// which rule defines first, which rule has a higher priority

// if no rule matches, it'll use the default one

"rules": [{

// rule input file

"file": "rules/common.txt",

// rule type

"type": "list",

// rule lookup server

// if you defined it at `servers`, you can use it he

"server": "tcp"

}, {

"file": "rules/extend.txt",

"type": "list",

// you can also define a custom name server here

"server": {

"host": "127.0.0.2",

"port": "53",

"type": "tcp"

}

}, {

// TODO: PAC file, thought it's a JavaScript file

"file": "rules/proxy.pac",

// TODO: support pac is coming soom

"type": "pac",

// also you can use a plain string

"server": "10.0.0.1"

}, {

// TODO: URL, support URL maybe coming soom

"url": "https://example.com/proxy.txt",

// TODO: support autoproxy is coming soom

"type": "autoproxy",

"server": "[::1]:5353@tcp"

}, {

// TODO: advance, advance is a custom rule

// you can specify any rules with any name server

"file": "rules/advance.json",

"type": "advance"

}, {

// use the parser defined in `extend-parser`

"file": "rules/foo.txt",

"type": "new-name"

}, {

// use the npm package defined in `extend-parser`

"file": "rules/bar.txt",

"type": "npm:dnsproxy-npm-another-parser",

"config": "some other fields required by custom parser"

}]

}

 

然后,运行:

dnsproxy -c dnsproxy-by-ccloli.json

项目地址:https://github.com/ccloli/DNSProxy

(不稳定)

---------

利用dnsproxy-by-Pythnist解决dns污染问题

 

git clone https://github.com/Pythnist/DNSProxy DNSProxy-by-Pythnist

cd DNSProxy-by-Pythnist

sudo python dnsproxy.py --host=127.0.0.1 --port=53 --server=8.8.8.8

项目地址:https://github.com/Pythnist/DNSProxy (不稳定)

 ---------

利用dnsproxy-by-qmphan解决dns污染问题 

git clone https://github.com/qmphan/dnsproxy dnsproxy-by-qmphan

cd dnsproxy-by-qmphan

sudo python dnsproxy.py --host=127.0.0.1 --port=53 --server=8.8.8.8

-----------

https://github.com/shuncox/smartdns 

 

git clone https://github.com/shuncox/smartdns smartdns -by-shuncox

cd smartdns -by-shuncox

sudo python smartdns.py

 -------------

https://github.com/parrotgeek1/ProxyDNS

(不稳定)

在mac机器上。

mkdir proxydns

cd proxydns

wget https://github.com/parrotgeek1/ProxyDNS/archive/master.zip

unzip proxydns-master.zip

cd proxydns-master

chmod 755 make.sh

./make.sh

(会在当前目录下,生成可执行文件proxydns)

sudo ./proxydns 208.67.222.222 443 53

会显示:

Started TCP thread
Started UDP thread

------------

在mac上。

git clone https://github.com/henix/shielddns shielddns-by-henix

cd shielddns-by-henix

nano config.rb

(config.rb的内容,见https://github.com/henix/shielddns页面)

sudo ruby shielddns.rb 0.0.0.0 53

项目地址:https://github.com/henix/shielddns

----------

git clone https://github.com/slene/dnsproxy dnsproxy-by-slene

cd dnsproxy-by-slene

go build (会在当前目录下,生成可执行文件dnsproxy-by-slene

./dnsproxy-by-slene -h

./dnsproxy-by-slene -local :53 -dns 8.8.8.8:53:tcp,8.8.4.4:53:tcp

------------

git clone https://github.com/vietor/dnsproxy dnsproxy-by-vietor

cd dnsproxy-by-vietor

make

cd src (在src目录下,生成了可执行文件dnsproxy)

./dnsproxy -h

./dnsproxy --port=53 --remote-addr=8.8.8.8 --remote-port=53 --remote-tcp

---------

利用cndns解决dns污染问题

在mac机器上。
git clone https://github.com/Nat-Lab/cndns  cndns-by-Nat-Lab
cd cndns-by-Nat-Lab
make
(在当前目录下,会生成可执行文件cndns)
sudo ./cndns -l 0.0.0.0 -p 53 -s 1.0.0.1 -m 15

它这个程序的思路有意思,“-m 15”的意思是只返回15毫秒或15毫秒以上的dns应答结果,这样就避免了dns污染。

看看能用多久。

实际使用例子:
sudo wg-quick up wg0
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/cndns-by-Nat-Lab && sudo ./cndns -l 0.0.0.0 -p 53 -s 1.0.0.1 -m 15

项目地址:https://github.com/Nat-Lab/cndns 
-------------
 
在mac机器上。
git clone https://github.com/creac/dnsAgent dnsAgent-by-creac
cd dnsAgent-by-creac
sudo python dnsAgent.py
(此命令是运行在后台的。)
 
------------
 

利用sdns解决dns污染问题(这个用不了多久)

 
在mac机器上。首先安装go环境,然后,
cd $GOPATH
go get -u -v github.com/semihalev/sdns
(sdns就会出现在$GOBIN/里面)

sdns
(第一次运行它,会在当前目录下,生成sdns.toml文件)
nano sdns.toml
(把bind的值改为":53" ,把bind前面的#号去掉。
rootservers的值改为:
[
"8.8.8.8:53",
"8.8.4.4:53"

 
然后运行:
 
sudo sdns -config=sdns.toml
不要关闭此terminal.
 
实际使用例子:
sudo wg-quick up wg0 
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
sudo sdns -config=sdns.toml
 
项目地址:github.com/semihalev/sdns
--------------
 

利用DNS-reverse-proxy解决dns污染问题 (这个用不了多久)

 
在mac机器上。首先安装go环境。然后,
git clone https://github.com/StalkR/dns-reverse-proxy
cd dns-reverse-proxy

go build .
(在当前目录下,会生成可执行文件dns-reverse-proxy)

sudo ./dns-reverse-proxy -address :53 -default 8.8.8.8:53
 
实际使用例子:
sudo wg-quick up wg0 
 
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/dns-reverse-proxy && sudo ./dns-reverse-proxy -address :53 -default 8.8.8.8:53
 
-------------
 

利用udpxd解决dns污染问题

 
在本地机器mac上。
git clone https://github.com/TLINDEN/udpxd udpxd-by-TLINDEN
cd udpxd-by-TLINDEN
make
(会在当前目录,生成可执行文件udpxd)
sudo ./udpxd -l 127.0.0.1:53 -t 8.8.8.8:53

实际使用例子:
cd ~/gtun-by-ICKelin/bin/gtun && sudo ./gtun-darwin_amd64 -c gtun.conf
(详见https://briteming.blogspot.com/2019/09/vpn-gtun.html

sudo route add default 192.168.1.1 && sudo route delete default && 
sudo route add default 100.64.240.1 && sudo route add vps-ip 192.168.1.1

sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1

cd ~/udpxd-by-TLINDEN &&  sudo ./udpxd -l 127.0.0.1:53 -t 8.8.8.8:53
不要关闭此terminal.

项目地址:https://github.com/TLINDEN/udpxd
-------------
 

利用portfwd解决dns污染问题

 
在本地机器mac上。
git clone https://github.com/rssnsj/portfwd portfwd-by-rssnsj
cd  portfwd-by-rssnsj
cd src
make
(在当前目录,会生成可执行文件udpfwd)
sudo ./udpfwd 127.0.0.1:53 8.8.8.8:53

实际使用例子:
./exodus-vpn-bwg.sh
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/portfwd-by-rssnsj/src && sudo ./udpfwd 127.0.0.1:53 8.8.8.8:53
不要关闭此terminal.

项目地址:https://github.com/rssnsj/portfwd
-------------

利用dns2tcp解决dns污染问题

 
在本地机器mac上。
brew install libuv

git clone https://github.com/zfl9/dns2tcp dns2tcp-by-zfl9
cd dns2tcp-by-zfl9
make
(在当前目录下,会生成可执行文件dns2tcp)
sudo ./dns2tcp -L"127.0.0.1#53" -R"8.8.8.8#53"
或者ctl+c ,
接着:
make install
(在/usr/local/bin/里面会生成dns2tcp)
sudo dns2tcp -L"127.0.0.1#53" -R"8.8.8.8#53"

使用例子:
运行全局代理程序mellow

sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1

sudo dns2tcp -L"127.0.0.1#53" -R"8.8.8.8#53"

项目地址:https://github.com/zfl9/dns2tcp

DNSProxy by andreafabrizi

DNS Proxy

Forward DNS requests from the local interface to a remote resolver, through http proxy requests.

DNS Proxy

DNS proxy listens for incoming DNS requests on the local interface and resolves remote hosts using an external PHP script, through http proxy requests.

If you can’t use VPN, UDP tunnels or other methods to resolve external names in your LAN, DNS proxy is a good and simple solution.

The source code is hosted on GitHub

Get the code

git clone https://github.com/andreafabrizi/DNSProxy.git

Build

For debian/ubuntu users:
apt-get install libcurl4-openssl-dev

then

make

Usage

dnsp -l 127.0.0.1 -h 10.0.0.2 -r 8080 -s http://www.andreafabrizi.it/nslookup.php

In this case, DNS proxy listens on port 53 (bind on 127.0.0.1) and sends the requests to external script through the 10.0.0.2:8080 proxy.

IMPORTANT: Please, don’t use the script hosted on my server, it’s only for testing purpose. Instead host the nslookup.php script on your own server or use a free hosting services. Thanks!

 dnsp 0.5
 usage: dnsp -l [local_host] -h [proxy_host] -r [proxy_port] -s [lookup_script]

 OPTIONS:
      -v  	 Enable DEBUG mode
      -p		 Local port
      -l		 Local host
      -r		 Proxy port
      -h		 Proxy host
      -u		 Proxy username (optional)
      -k		 Proxy password (optional)
      -s		 Lookup script URL

Testing

To test if DNS proxy is working correctly, first run the program as following (replace the placeholders with the correct proxy IP and port!):

dnsp -l 127.0.0.1 -h x.x.x.x -r nnnn -s http://www.andreafabrizi.it/nslookup.php

then, try to resolve an hostname using the dig command:

dig www.google.com @127.0.0.1

The result must be something like this:

; <<>> DiG 9.8.1-P1 <<>> www.google.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29155
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com. 		IN	A

;; ANSWER SECTION:
www.google.com.		3600	IN	A	173.194.64.106

;; Query time: 325 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri May 17 11:52:08 2013
;; MSG SIZE  rcvd: 48

from https://www.andreafabrizi.it/2013/05/17/DNSProxy/
项目地址:https://github.com/andreafabrizi/DNSProxy

public-dns.info

This list of public and free DNS servers is checked continuously. Read how to change your DNS server settings .

IPv4/IPv6 Address Location Software / Version Checked at State Reliability Whois
125.31.58.114
n12531z58l114.static.ctmip.net.
Macao   Valid valid 100 % Whois
123.16.13.12
static.vnpt.vn.
Viet Nam, Hanoi   Valid valid 92 % Whois
118.193.31.114 Hong Kong 9.9.4-RedHat-9.9.4-61.el7_5.1 Valid valid 100 % Whois
104.37.214.18 United States 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.1 Valid valid DNSSEC 99 % Whois
77.105.216.207 Sweden, Vaxjo PowerDNS Recursor 4.0.4 Valid valid 100 % Whois
217.115.63.30
217-115-63-30.cust.bredband2.com.
Sweden PowerDNS Recursor 4.1.9 (built Jan 21 2019 10:00:07 by root@a646cf76c9d3) Valid valid 92 % Whois
94.245.56.130
h94-245-56-130.cust.a3fiber.se.
Sweden, Taeftea PowerDNS Recursor 4.1.12 (built Apr 2 2019 10:33:18 by root@58c9f6770f2f) Valid valid 100 % Whois
81.216.9.110
thor.ktv.nu.
Sweden, Luleå   Valid valid 100 % Whois
46.246.65.198 Sweden, Stockholm PowerDNS Recursor 4.1.4 (built Oct 24 2018 15:00:58 by portage@frankfurt-ns02) Valid valid 100 % Whois
194.14.79.66
194-14-79-66.customers.aardnet.se.
Sweden, Valbo   Valid valid DNSSEC 89 % Whois
5.150.233.72
h-233-72.A260.priv.bahnhof.se.
Sweden, Karlskoga dnsmasq-2.39 Valid valid DNSSEC 99 % Whois
81.227.32.174
81-227-32-174-no2212.tbcn.telia.com.
Sweden, Insjoen 9.11.3+5738 Valid valid DNSSEC 99 % Whois
185.231.103.69
xn--caffotograferna-dnb.se.
Sweden not currently available Valid valid DNSSEC 100 % Whois
217.215.126.220
217-215-126-220-no2340.digitaltv.telia.com.
Sweden dnsmasq-2.78-2-gb87ca73 Valid valid 61 % Whois
78.68.92.241
78-68-92-241-no2207.digitaltv.telia.com.
Sweden, Gothenburg dnsmasq-2.45 Valid valid DNSSEC 100 % Whois

https://public-dns.info

v2ray的简单的服务器端的配置文件和客户端的配置文件

服务端的配置文件的内容:

{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 25536,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "84dbb5b3-2a27-5c85-afef-e9e10401320d",
"level": 1,
"alterId": 100
}
]
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

 

客户端的配置文件的内容:

{
"log": {
"loglevel": "warning"
},
"inbound": {
"listen": "127.0.0.1",
"port": 2080,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "your-vps-ip",
"port": 25536,
"users": [
{
"id": "84dbb5b3-2a27-5c85-afef-e9e10401320d",
"level": 1,
"alterId": 100
}
]
}
]
},
"mux": {
"enabled": true,
"concurrency": 8
}
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"port": "54-79",
"outboundTag": "direct"
},
{
"type": "field",
"port": "81-442",
"outboundTag": "direct"
},
{
"type": "field",
"port": "444-65535",
"outboundTag": "direct"
},
{
"type": "field",
"domain": [
"gc.kis.scr.kaspersky-labs.com"
],
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
}
}

完全可以用来翻墙。

from https://intmainreturn0.com/v2ray-config-gen/

Hello, DNS!

Hello and welcome to DNS! https://powerdns.org/hello-dns/

This series of documents attempts to provide a correct introduction to the Domain Name System as of 2018. The original RFCs remain the authoritative source of normative text, but this document tries to make this venerable protocol more accessible, while maintaining full alignment with all relevant and useful RFCs.

This effort is developed cooperatively on GitHub, the repository can be found https://github.com/ahupowerdns/hello-dns/and help is highly welcome! Feedback can also be sent to bert.hubert@powerdns.com or @PowerDNS_Bert.

Contributors so far include: Michał Kępień, Jan-Piet Mens, Andrew Babichev, Jacob Hoffman-Andrews, Peter van Dijk, Nathan Froyd, Gene McCulley, Charles-Henri Bruyand, jose nazario, Warren Kumari, Patrick Cloke, and Andrew Tunnell-Jones. Thanks!

Although we start from relatively basic principles, the reader is expected to know what IP addresses are, what a (stub) resolver is and what an authoritative server is supposed to do. When in doubt: authoritative servers 'host' DNS data, 'resolvers' look up things over at authoritative servers and clients run 'stub resolvers' to look things up over at resolvers. This document is aimed at developers, but may also be of aid for administrators.

DNS was originally written down in August 1979 in 'IEN 116', part of a parallel series of documents describing the Internet. IEN 116-era DNS is not compatible with today's DNS. In 1983, RFC 882 and 883 were released, describing a version of the DNS very similar but not quite interoperable with the one we have today.

DNS attained its modern form in 1987 when RFC 1034 and 1035 were published. Although much of 1034/1035 remains valid, these standards are not that easy to read because they were written in a very different time. There are 100s of pages of updates that can only be found in later documents.

The main goal of this effort is not to contradict the DNS RFCs but to provide an easier entrypoint into understanding the Domain Name System.

If you will, the goal is to be a mini "TCP/IP Illustrated" of DNS. For more about the philosophy of these documents, and how to contribute, please read meta.md. Your help & insights are highly welcome!

I want to thank Ólafur Guðmundsson and Job Snijders for their input and enthusiasm for improving the state of DNS.

Layout

The content is spread out over several documents:

We start off with a general introduction of DNS basics: what is a resource record, what is an RRSET, what is a zone, what is a zone-cut, how are packets laid out. This part is required reading for anyone ever wanting to query a nameserver or emit a valid response.

We then specialize into what applications can expect when they send questions to a resolver, or what a stub resolver can expect.

The next part is about what an authoritative server is supposed to do. On top of this, we describe in slightly less detail how a resolver could operate. Finally, there is a section on optional elements like EDNS, TSIG, Dynamic Updates and DNSSEC.

RFCs, especially earlier ones, tend to describe servers that perform both authoritative and resolver functions. This turns out to make both code and troubleshooting harder. Therefore, in these documents, the authoritative and caching functions are described separately.

Next up: DNS Basics.

<style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>

from https://github.com/ahupowerdns/hello-dns

在mac上,用brew安装v2ray

 


Install v2ray-core

step 1: Add official tap

brew tap v2ray/v2ray

step 2: Install v2ray-core:

brew install v2ray-core

Update v2ray-core

step 1: update tap

brew update

step 2: update v2ray-core

brew upgrade v2ray-core

Uninstall v2ray-core

step 1: uninstall core

brew uninstall v2ray-core

step 2: untap official formula

brew untap v2ray/v2ray

Usage

once you installed, you can run command via v2ray to run v2ray-core.

The defualt config file location is:/usr/local/etc/v2ray/config.json

step 1: edit the default config:

vim /usr/local/etc/v2ray/config.json

step 2: run v2ray-core without starting at login.

brew services run v2ray-core

or run v2ray-core and register it to launch at login via:

brew services start v2ray-core

fromhttps://github.com/v2ray/homebrew-v2ray
-------

To have launchd start v2ray/v2ray/v2ray-core now and restart at login:

  brew services start v2ray/v2ray/v2ray-core

Or, if you don't want/need a background service you can just run:

  v2ray -config=/usr/local/etc/v2ray/config.json

==> Summary

🍺  /usr/local/Cellar/v2ray-core/4.19.1: 7 files, 34MB, built in 9 minutes 46 seconds