Mar 03

ProxyChain

这几个工具都支持带用户名密码认证的上级代理,代理可以是 socks4/5,http-connect 等,glider 和 gost 还额外支持 ss,ssr 作为上级代理,但是对用户名密码或者附加参数中带‘@’号处理有些问题。

还需要注意,代理链中的第二级代理(最后一级?),‘必须’要具有外网 IP ,不然很容易失败。(这也是为什么要求支持用户名密码认证)

范例:
本地代理监听 0.0.0.0:7777 端口,上级两个代理级联(代理链),第一代理为: 192.168.2.20:7575 ,第二代理为:1.1.1.1:10086 (用户名 user , 密码 passwd)

gost:(https://github.com/ginuerzh/gost)

gost -L=:7777 -F=socks5://192.168.2.20:7575 -F=socks5://user:passwd@1.1.1.1:10086 -D

glider: (https://github.com/nadoo/glider)

glider -listen 0.0.0.0:7777 -forward socks5://192.168.2.20:7575,socks5://user:passwd@1.1.1.1:10086 -verbose

proxychains+microsocks (https://github.com/rofl0r/proxychains-ng, https://github.com/rofl0r/microsocks)

proxychains 配置文件:
strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
socks5 192.168.2.20 7575
socks5 1.1.1.1 10086 user passwd

命令行:
proxychains4 microsocks -p 7777

访问流程:
客户端请求-->SOCKS5:7777-->SOCKS5:192.168.2.20:7575-->SOCKS5:1.1.1.1:10086-->远程服务

gost 启动很慢,内存占用极高,glider 比较均衡,这两个都是 golang 编写的;proxychains+microsocks 是 C 写的,占用最小,适合配置不高的设备,但是需要自己编译,配置稍显麻烦。


Feb 11

Upcycle Windows 7 petition image

Microsoft's support of Windows 7 is over, but its life doesn't have to end. We call on Microsoft to upcycle it instead.


Jan 01

为了体验 BBRPlus,然后,就,崩了。。。丢了几篇文章貌似。。。

重装 Debian (以前是 Ubuntu),居然可以了~

:evil: :evil: :evil:


Aug 29

ECS (edns-client-subnet)的支持上,国内 DNS派,国外 Google 支持最好,而 Overture 支持上发 EDNS 信息,基于这几个特点,可以在 VPS (无论在国内还是国外)建立一个 CDN 友好的 DNS 服务器。

国外 VPS 配置范例:

{
"BindAddress": ":5353",
"DebugHTTPAddress": "127.0.0.1:5555",
"PrimaryDNS": [
{
"Name": "DNSPaiS",
"Address": "218.30.118.6:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
},
{
"Name": "DNSPaiM",
"Address": "101.226.4.6:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
}
],
"AlternativeDNS": [
{
"Name": "GoogleM",
"Address": "8.8.8.8:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 3,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
},
{
"Name": "GoogleS",
"Address": "8.8.4.4:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 3,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
}
],
"OnlyPrimaryDNS": false,
"IPv6UseAlternativeDNS": false,
"WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS",
"IPNetworkFile": {
"Primary": "./cn.zone",
"Alternative": "./ip_network_alternative_sample"
},
"DomainFile": {
"Primary": "./domain_primary_sample",
"Alternative": "./domain_alternative_sample",
"Matcher": "regex-list"
},
"HostsFile": "./hosts_sample",
"MinimumTTL": 0,
"DomainTTLFile" : "./domain_ttl_sample",
"CacheSize" : 10000,
"RejectQType": [255]
}

国内/路由器等配置范例:(注意与国外的主要差别,使用了 Google 的 DNS-Over-TLS,否则会被污染)

{
"BindAddress": "0.0.0.0:5554",
"DebugHTTPAddress": "0.0.0.0:8081",
"PrimaryDNS": [
{
"Name": "DNSPaiS",
"Address": "123.125.81.6:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 3,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
},
{
"Name": "DNSPaiM",
"Address": "101.226.4.6:53",
"Protocol": "udp",
"SOCKS5Address": "",
"Timeout": 3,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
}
],
"AlternativeDNS": [
{
"Name": "GoogleM",
"Address": "dns.google:853@8.8.8.8",
"Protocol": "tcp-tls",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
},
{
"Name": "GoogleS",
"Address": "dns.google:853@8.8.4.4",
"Protocol": "tcp-tls",
"SOCKS5Address": "",
"Timeout": 6,
"EDNSClientSubnet": {
"Policy": "auto",
"ExternalIP": "223.73.56.110",
"NoCookie": true
}
}
],
"OnlyPrimaryDNS": false,
"IPv6UseAlternativeDNS": false,
"WhenPrimaryDNSAnswerNoneUse": "AlternativeDNS",
"IPNetworkFile": {
"Primary": "/opt/etc/cn.zone",
"Alternative": "/opt/etc/empty"
},
"DomainFile": {
"Primary": "/opt/etc/empty",
"Alternative": "/opt/etc/empty"
},
"HostsFile": "",
"MinimumTTL": 300,
"DomainTTLFile" : "/opt/etc/domain_ttl.txt",
"CacheSize" : 8192,
"RejectQtype": [255]
}

:cool: :cool: :cool:


Aug 28

移动网络完全没法下载 BT,想到用电信网络做代理,试过 shadowsocks,3proxy 等大量 Socks5 服务器软件,都因为不支持 udp:// 格式的 Tracker 服务器导致速度上不去,最后用 Dante 解决问题。证据看下面用 Proxifier 代理 qBittorrent 的截图:

直接安装二进制文件:

apt install dante-server

这样安装下来的执行文件为: danted,配置文件为 /etc/danted.conf, 其它参考以下内容。

我们从源码安装 Dante:

# cd /usr/src
# wget http://www.inet.no/dante/files/dante-1.4.2.tar.gz
# tar -zxf dante-1.4.2.tar.gz
# cd dante-1.4.2/
# apt-get install gcc make
# ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var --disable-client --without-libwrap --without-bsdauth --without-gssapi --without-krb5 --without-upnp --without-pam
# make && make install

之后检查下安装情况:

# /usr/local/sbin/sockd -v
Dante v1.4.2. Copyright (c) 1997 - 2014 Inferno Nettverk A/S, Norway

编辑配置文件:

# nano /etc/sockd.conf

内容如下:

logoutput: /var/log/sockd.log

internal: 0.0.0.0 port = 10086
external: ens3 #ipconfig 查看自己的接口,也可能是 eth0 等

socksmethod: username #本机用户名方式登录
user.privileged: root
user.notprivileged: nobody

client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}

client block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}

socks block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}

启动服务器:

/usr/local/sbin/sockd -f /etc/sockd.conf -D

开机自启动:

systemctl edit dante --full --force

内容:

[Unit]
Description=Dante Socks5 Server Service
Documentation=man:dante(1)
After=network-online.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/local/sbin/sockd -f /etc/sockd.conf

[Install]
WantedBy=multi-user.target

然后:

systemctl enable --now dante

添加无 SSH 登录权限用户(仅用于 Dante):

useradd -s /sbin/nologin yourname
passwd youname

然后在路由器上做端口映射,把 10086 端口暴露出去即可。 :mrgreen: :mrgreen: :mrgreen:


[6/59]  < 1 2 3 4 5 6 7 8 9 10 > ... »