头像

@byxiaoxie6月前

11/2
04:17
Home

DC Radar 搭建Hosts中转

此方法仅用与[ubuntu 14.04+ debian 8]系统
服务器:系统平台[Debian 8 x64] 测试IP:[149.28.13*.**] 主机:系统平台[Windows 7]

先更新并安装依赖库

apt update  && apt upgrade -y

apt install -y git build-essential autotools-dev cdbs debhelper dh-autoreconf dpkg-dev gettext libev-dev libpcre3-dev libudns-dev pkg-config fakeroot devscripts supervisor

下载[sniproxy]源码编译安装

git clone https://github.com/dlundquist/sniproxy.git

cd sniproxy/

./autogen.sh && dpkg-buildpackage

dpkg -i ../sniproxy_*.deb
删除[sniproxy]配置文件并插件一个新的配置 两个配置选一个即可

rm /etc/sniproxy.conf

配置文件1:

cat <<EOT >> /etc/sniproxy.conf
user root
pidfile /var/run/sniproxy.pid

resolver {
nameserver 1.1.1.1
search example.com
mode ipv4_only
}

error_log {
syslog  daemon
priority notice
}

access_log {
syslog daemon
priority notice
}

listen 80 {
proto http
}

listen 443 {
proto tls 
}

table {
prod-live-front\.playbattlegrounds\.com$ 37.48.78.35
(.*\.|)playbattlegrounds\.com$ *
(.*\.|)pubgbluehole\.com$ *
(.*\.|)damncheaters\.com$ *
(.*\.|)gamedev-studios\.com$ *
steamcdn-a\.akamaihd\.net$ *
(.*\.|)execute-api\.us-west-2\.amazonaws\.com$ *    
}
EOT

配置文件2:

cat <<EOT >> /etc/sniproxy.conf
user root
pidfile /var/run/sniproxy.pid

resolver {
nameserver 1.1.1.1
search example.com
mode ipv4_only
}

error_log {
syslog  daemon
priority notice
}

access_log {
syslog daemon
priority notice
}

listen 80 {
proto http
}

listen 443 {
proto tls 
}

table {
prod-live-front\.playbattlegrounds\.com$ 212.32.240.4
(.*\.|)playbattlegrounds\.com$ *
(.*\.|)pubgbluehole\.com$ *
(.*\.|)damncheaters\.com$ *
(.*\.|)gamedev-studios\.com$ *
steamcdn-a\.akamaihd\.net$ *
(.*\.|)execute-api\.us-west-2\.amazonaws\.com$ *    
}
EOT
创建开机启动

rm /etc/init.d/sniproxy

cat <<EOT >> /etc/supervisor/conf.d/sniproxy.conf
[program:sniproxy]
command=/usr/sbin/sniproxy
autorestart=true
user=root
EOT
启动服务与查看服务是否启动

service supervisor start && supervisorctl reload

supervisorctl restart sniproxy

ps aux | grep sniproxy
Windows下替换Hosts文件 

路径:[C:\Windows\System32\drivers\etc\hosts]

# Copyright (c) 2018 ByXiaoXie Mail:[email protected]

149.28.13*.**	   prod-live-front.playbattlegrounds.com
149.28.13*.**	   prod-live-entry.playbattlegrounds.com
149.28.13*.**	   steamcdn-a.akamaihd.net
149.28.13*.**	   signcode.pubgbluehole.com
149.28.13*.**	   gw.gamedev-studios.com

 

DC Radar 搭建Hosts中转

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

加载中……