{"repo":"myxuchangbin/dnsmasq_sniproxy_install","free":true,"listed":false,"github":"https://github.com/myxuchangbin/dnsmasq_sniproxy_install","clone":"git clone https://github.com/myxuchangbin/dnsmasq_sniproxy_install.git","description":"One-click Install and Configure Dnsmasq and Sniproxy for CentOS/Debian/Ubuntu","language":"Shell","stars":1443,"topics":["dnsmasq","sniproxy","netflix","shell","dns-server"],"license":null,"category":"cli-tools","readme_excerpt":"Dnsmasq SNIproxy One-click Install 脚本概述： 原理简述：利用Dnsmasq的DNS功能，将特定网站的DNS解析重定向到SNIproxy反向代理。 用途：让访问流媒体受限的VPS突破限制，前提是要有一个能流媒体的VPS。 特性：脚本默认解锁 Netflix Hulu HBO 等，如需增删流媒体域名请编辑文件 /etc/dnsmasq.d/custom netflix.conf 和 /etc/sniproxy.conf 脚本支持系统：CentOS7+, Debian9+, Ubuntu18+ 如果脚本最后显示的IP和实际公网IP不符，请修改一下文件 /etc/sniproxy.conf 中的IP地址 脚本用法： bash dnsmasq sniproxy.sh [-h] [-i] [-f] [-id] [-fd] [-is] [-fs] [-u] [-ud] [-us] -h , --help 显示帮助信息 -i , --install 安装 Dnsmasq + SNI Proxy -f , --fastinstall 快速安装 Dnsmasq + SNI Proxy -id, --installdnsmasq 仅安装 Dnsmasq -fd, --installdnsmasq 快速安装 Dnsmasq -is, --installsniproxy 仅安装 SNI Proxy -fs, --fastinstallsniproxy 快速安装 SNI Proxy -u , --uninstall 卸载 Dnsmasq + SNI Proxy -ud, --undnsmasq 卸载 Dnsmasq -us, --unsniproxy 卸载 SNI Proxy 快速安装（推荐）： 普通安装： 卸载方法： 使用方法： 将代理主机的 DNS 地址设置为安装了 dnsmasq 的主机 IP 即可，如果遇到问题，尝试在配置文件中只保留一个 DNS 地址。 为了防止滥用，建议不要公开 IP 地址，并使用防火墙进行适当的访问限制。 调试排错： - 确认 sniproxy 运行状态 查看sniproxy状态： systemctl status sniproxy 如果 sniproxy 未运行，请检查是否有其他服务占用了 80、443 端口，导致端口冲突。可以使用 netstat -tlunp grep 443 命令查看端口监听情况。 - 确认防火墙设置 确保防火墙已放行 53、80、443 端口。在调试时，可以关闭防火墙： systemctl stop firewalld.service 对于阿里云、腾讯云、AWS 等云服务提供商，安全组的端口设置同样需要放行。 使用其他服务器进行测试： telnet 1.2.3.4 53 - 域名解析测试 在配置完 DNS 后，进行域名解析测试： nslookup netflix.com 检查 IP 是否为 Netflix 代理服务器的 IP。 如果系统中没有 nslookup 命令，可以在 CentOS 上安装： yum install -y bind-utils 在 Ubuntu 和 Debian 上安装： apt-get -y install dnsutils - 解决 systemd-resolve 服务占用 53 端口的问题 使用 netstat -tlunp grep 53 发现 53 端口被 systemd-resolved 占用 修改 /etc/systemd/resolved.con","default_branch":null,"files":null,"tree":[],"storefront":"/r/myxuchangbin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/myxuchangbin/dnsmasq_sniproxy_install/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}