opendns ss配置ss连不上上

一觉醒来,极路由+SS神奇的连不上了,吧里有这方面的菊苣嘛?_ps4吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0可签7级以上的吧50个
本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:756,554贴子:
一觉醒来,极路由+SS神奇的连不上了,吧里有这方面的菊苣嘛?
以前用过一些NPV,9月份购入了极路由+东京SS,用来一直没什么问题,但是昨天起床后发现连不上PSN了(和也不行),用的是的,找客服测试过SS账号没问题,DNS也换过不少,都是连不上,关掉SS加速反倒可以连上.....开了SS不仅所有国外网站不能上,一些国内网站(比如)也都上不了,统一都显示错误...SS客服说我网络设置自己改过,关键是我什么都没动,前一天晚上还联机玩着呢,请教有遇到过这种情况的人嘛?如何解决呢..
挂了ss还挂干什么。。
你SS账号的服务器有人下载版权片被服务器商封了,找卖家换个服务器就好了
运营商问题,连国外服务器的首推电信,改dns上的了默认也上的了,默认上不了改了dns也上不了,关键是测试哪个上下行速度快
使用签名档&&
保存至快速回贴之前发布过一篇,这篇教程有些一笔带过看不明白的可以先过一遍上一篇,这次换用shadowsocks不是因为goagent不好用,之前部署的goagent的工作状态一直很好,换用shadowsocks一是因为之前刷的潘多拉固件搞不上去IPv6,需要重新编译一个Openwrt,所以纯属折腾一下,二是因为手头有个香港的VPS速度很好,除了youtube速度没有goagent快之外,其他似乎都要快些,主要是shadowsocks现在已经成规模了,免费的账号很多,也有很多在卖SS的账号。
已实现的功能
特定网站自动穿墙
局域网设备IPv6支持
双(多)拨网速叠加
QOS流量控制
过滤联盟和部分视频网站广告
DDNS以及网站搭建
KMS激活服务
关于Openwrt的编译流程可以参考这篇,由于我们编译的是trunk版,它的更新速度很快所以有关内核的东西如果编译的时候不选择好的话,后面可能会无法安装,即使是使用opkg install xxx --force-depends强制安装,也会出现很多问题(血的教训),所以这里着重说一下make menuconfig的部分
Target System(Ralink RT288x/RT3xxx)
Subtarget(MT7620a based boards)
Base system -> block-mount
Base system -> dnsmasq-full
Libraries -> libmnl (ipset依赖)
Libraries -> libpcre (nginx依赖)
LuCI -> 1. Collections -> luci
LuCI -> 3. Applications -> luci-app-commands
LuCI -> 3. Applications -> luci-app-ddns
LuCI -> 3. Applications -> luci-app-firewall
LuCI -> 3. Applications -> luci-app-multiwan
LuCI -> 3. Applications -> luci-app-ntpc
LuCI -> 3. Applications -> luci-app-qos-emong (QOS流量控制 可设置单IP限速)
LuCI -> 3. Applications -> luci-app-samba
LuCI -> 3. Applications -> luci-app-upnp
LuCI -> 3. Applications -> luci-app-wol
LuCI -> 4. Themes -> luci-theme-bootstrap
LuCI -> 4. Themes -> luci-theme-openwrt
LuCI -> 5. Translations -> luci-i18n-chinese
LuCI -> 6. Protocols -> luci-proto-ipv6
Kernel modules -> Filesystems -> kmod-fs-ext4
Kernel modules -> Filesystems -> kmod-fs-nfs
Kernel modules -> Filesystems -> kmod-fs-nfs-common
Kernel modules -> Filesystems -> kmod-fs-ntfs
Kernel modules -> Filesystems -> kmod-fs-vfat
Kernel modules -> Native Language Support -> kmod-nls-cp437
Kernel modules -> Native Language Support -> kmod-nls-iso8859-1
Kernel modules -> Native Language Support -> kmod-nls-utf8
Kernel modules -> Netfilter Extensions -> kmod-ipt-ipset (dnsmasq IPSET 支持)
Kernel modules -> Netfilter Extensions -> kmod-nfnetlink (kmod-ipt-ipset依赖)
Kernel modules -> Network Devices -> kmod-macvlan (虚拟WAN口多拨)
Kernel modules -> Network Devices -> kmod-sched (QOS依赖)
Kernel modules -> Other modules -> kmod-mmc
Kernel modules -> Other modules -> kmod-sdhci
Kernel modules -> Other modules -> kmod-sdhci-mt7620
Network -> Firewall -> iptables -> iptables-mod-nat-extra (QOS & shadowsocks依赖)
Network -> Firewall -> iptables -> iptables-mod-iprange (QOS依赖)
Network -> Web Servers/Proxies -> nginx (Web服务器和去视频广告做反向代理)
Network -> Web Servers/Proxies -> pdnsd (防止DNS污染)
Network -> 6in4
Network -> ipset
Network -> ppp-mod-pppoe
Network -> shadowsocks-libev-polarssl (主角)
Utilities -> bzip2
Utilities -> Filesystem -> badblocks
Utilities -> Filesystem -> e2fsprogs
Utilities -> disc -> fdisk
默认的trunk版中是没有pdnsd/luci-app-qos-emong/shadowsocks-libev-polarssl/multiwan这4个源文件的,使用下面的命令获取编译需要的文件
cd ~/openwrt/trunk/package
git clone /madeye/shadowsocks-libev.git
git clone /prochip/mybox.git
svn co svn://svn.openwrt.org/openwrt/branches/packages_14.07/net/multiwan
svn co svn://svn.openwrt.org/openwrt/branches/packages_14.07/net/pdnsd
由于实在找不到luci-app-qos-emong的完整版本,这里从mybox中获取到luci-app-qos-emong缺少一个文件/mybox/luci-qos-emong/files/usr/bin/qos-emong,我们可以从其他地方提取,比如别人发布的编译好的ipk或者解压潘多拉的固件,记得设置这个文件属性为0755。
另外编译之前需要先配置uhttpd的设置,在编译之前配置是因为同时安装了uhttpd和nginx,这两个人会抢占80端口,nginx会优先uhttpd启动导致luci打不开。我们可以建立~/openwrt/trunk/files/etc/目录,并放置一些配置文件,这里的文件会覆盖到固件中的overlay中覆盖默认的设置。
建立文件~/openwrt/trunk/files/etc/config/uhttpd输入内容
config uhttpd 'main'
list listen_http '0.0.0.0:10'
list listen_http '[::]:10'
#list listen_https '0.0.0.0:443'
#list listen_https '[::]:443'
option home '/www'
option rfc1918_filter '1'
option max_requests '3'
option max_connections '100'
option cert '/etc/uhttpd.crt'
option key '/etc/uhttpd.key'
option cgi_prefix '/cgi-bin'
option script_timeout '60'
option network_timeout '30'
option http_keepalive '20'
option tcp_keepalive '1'
option ubus_prefix '/ubus'
config cert 'px5g'
option days '730'
option bits '1024'
option country 'DE'
option state 'Berlin'
option location 'Berlin'
option commonname 'OpenWrt'
主要是修改uhttpd的端口,有需要的话其他的配置文件也可以放到这里,一并刷进去,当然也可以刷好之后再配置下面的部分。
开机加载SD卡,文件~/openwrt/trunk/files/etc/config/fstab
config global
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'
config mount
option uuid '7bdb-42fd'
option target '/mnt/sd'
option fstype 'ext4'
option enabled '1'
建立虚拟wan口~/openwrt/trunk/files/etc/rc.loca
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
ip link add link eth0.2 name vth1 type macvlan
ifconfig vth1 hw ether 00:18:F8:B5:E5:5E
ifconfig vth1 up
ip link add link eth0.2 name vth2 type macvlan
ifconfig vth2 hw ether 00:01:6C:06:A6:29
ifconfig vth2 up
/etc/init.d/multiwan restart
pdns配置文件~/openwrt/trunk/files/etc/pdnsd.conf
perm_cache=1024;
cache_dir=&/var/pdnsd&;
run_as=&nobody&;
server_port = 10053;
server_ip = 127.0.0.1;
status_ctl =
query_method=tcp_
min_ttl=15m;
max_ttl=1w;
timeout=10;
label= &GooglePublicDNS&;
ip = &8.8.4.4&;
root_server =
# serve_aliases=
file=&/etc/hosts&;
a=127.0.0.1;
soa=localhost,root.localhost,42,400,86400;
切记uhttpd的配置文件必须要在编译的时候编译进去,或者不编译nginx,等到刷好之后再执行opkg install nginx安装。
做完上面的步骤就可以执行make -j 2 V=99进行编译了。
注册个账号,然后会获得一堆信息,编辑/etc/config/network添加
config interface 'henet'
option proto '6in4'
option username '用户名'
option peeraddr '服务器IP'
option ip6addr '2/64结尾的那串IP'
option ip6prefix '::/64结尾的那串IP'
option tunnelid '你的ID'
option password '更新的KEY'
option dns '路由的本地ipv6地址'
在Luci中点击这个端口后面的连接就可以了。
双拨网速叠加
这才是真正的加量不加价,上面我们已经配置了开机自动虚拟出来一个vth1,在接口中新建一个接口配置PPPOE拨号就可以了,编辑/etc/config/network添加wan2的配置信息。
config interface 'wan'
option ifname 'eth0.2'
option proto 'pppoe'
option username '运营商提供的宽带账号'
option password '密码'
option peerdns '1'
config interface 'wan2'
option ifname 'vth1'
option macaddr '00:18:F8:B5:E5:5E'
option proto 'pppoe'
option username '运营商提供的宽带账号'
option password '密码'
option peerdns '0'
我这里的情况是在日志中可以看到pppoe在不停的拨号,不时返回一个用户限制的错误信息,不用理会,一般拨6多个小时就拨上了,下面到multiwan中配置一下流量均衡。
/etc/config/multiwan
config multiwan 'config'
option enabled '1'
option default_route 'balancer'
config interface 'wan'
option health_interval '10'
option timeout '3'
option health_fail_retries '3'
option health_recovery_retries '5'
option failover_to 'wan2'
option dns 'auto'
option weight '5'
option icmp_hosts ''
config interface 'wan2'
option health_interval '10'
option timeout '3'
option health_fail_retries '3'
option health_recovery_retries '5'
option failover_to 'balancer'
option dns 'auto'
option weight '5'
option icmp_hosts ''
shadowsocks的具体设置
这里我们用的是dnsmasq-full提供的ipset功能自动维护IP库,依然和goagent一样指定域名就可以了。
在/etc/shadowsocks.d/shadowsocks.json中配置好服务器的IP和端口等信息
&server&:&222.222.222.222&,
&server_port&:8080,
&password&:&1111&,
&timeout&:600,
&method&:&rc4-md5&,
&fast_open&:false,
&fast_open&: true,
&workers&: 1
除了自动转发的端口外,我们还可以搭建一个SOCKS5的代理,因为为了减少不必要的流量通过SS的服务器,这里使用的是黑名单模式,那就难免会有漏网之鱼,我们可以再开放一个代理端口来和SwitchySharp之类的插件配合,需要的时候启用全局代理。
shadowsocks自1.4.6版本起增加了acl白名单功能,这样在我们启用全局代理的时候,不会把国内IP和局域网IP也通过SS服务器,内容可以通过获取。
编辑/etc/init.d/shadowsocks文件内容如下
#!/bin/sh /mon
# Copyright (C)
OpenWrt.org
SERVICE_USE_PID=1
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
service_start /usr/bin/ss-local -c /etc/shadowsocks.d/shadowsocks.json -l &8888& --fast-open
service_start /usr/bin/ss-redir -c /etc/shadowsocks.d/shadowsocks.json -l &10080&
service_stop /usr/bin/ss-local
service_stop /usr/bin/ss-redir
如果你的服务器和客户端Linux内核版本都大于3.7(Openwrt trunk现在是3.14),可以打开fast_open功能,速度会提升不少。将配置文件中的"fast_open":false修改成"fast_open":true,在Shell中执行echo "net.ipv4.tcp_fastopen=3" >> /etc/sysctl.conf && sysctl -p来打开tcp_fastopen功能。
编辑/etc/dnsmasq.conf文件,在尾部追加
conf-dir=/etc/dnsmasq.d
建立/etc/dnsmasq.d/gfwlist.conf文件来维护需要穿透GFW的域名列表,dnsmasq会用ipset自动维护ip列表,记录的IP库可以使用ipset -L命令查看。
server=/./.facebook.net/.fbcdn.net/./.akamaihd.net/127.0.0.1#10053
ipset=/./.facebook.net/.fbcdn.net/./fbcdn-profile-a.akamaihd.net/fbcdn-sphotos-a.akamaihd.net/outwall
server=/./.twitter4j.org/./././././.twittertim.es/.t.co/./././././127.0.0.1#10053
ipset=/./.twitter4j.org/./././././.twittertim.es/.t.co/././././/outwall
上面是Facebook和Twitter的示例,可以按照需要维护这个列表,我在这里配置的Google的相关服务使用IPv4/IPv6配合直接解析的,毕竟直连的速度要好的多(起码不比百度慢吧),Google北京的服务器直接访问是404错误,但是不代表它什么都不处理,translate/code/gstatic是可以解析到国内IP的,具体的东西自己挖掘吧,建议不要公开的好,别把国内仅剩的这几台也玩坏了,所以同理许多网站是可以通过dnsmasq指定IP地址来访问,至于速度、时间成本就各有各的看法了。
我目前在用的方案是Google解析ip,dropbox目前只需要解决DNS污染问题就可以了,特定的常用网站和一些乱七八糟的不值得去找真实IP的通过ipset走shadowsocks。
配置转发,在/etc/firewall.user文件中追加
ipset -N outwall iphash
iptables -t nat -A PREROUTING -p tcp -m set --match-set outwall dst -j REDIRECT --to-port 10080
重启防火墙,这里的10080是上面提到的本地监听端口,两者要保持一致。
建立/etc/dnsmasq.d/adblock.conf文件来过滤一些明显的联盟广告
bogus-nxdomain=218.30.64.194
address=//127.0.0.1
address=/s./127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=/gelo.tw/127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=/./127.0.0.1
address=/./127.0.0.1
address=/.cnxad.net/127.0.0.1
address=/./127.0.0.1
address=/./127.0.0.1
address=/./127.0.0.1
address=/./127.0.0.1
address=/./127.0.0.1
address=/..cn/127.0.0.1
address=/.doubleclick.net/127.0.0.1
address=//127.0.0.1
address=//127.0.0.1
address=/hudong./127.0.0.1
编辑nginx的配置文件/etc/nginx/nginx.conf,内容如下
#设定用户及其用户名
worker_processes
1; #允许线程个数
/mnt/sd/logs/nginx/error.
#指定error.log的位置
/var/run/nginx. #指定pid的存放位置
worker_connections
#指定最大连接数
server_ #关闭在错误页面中的nginx版本
#default_type
application/octet-
#access_log
logs/access.
#关闭访问日志
keepalive_timeout
reset_timedout_ #关闭不响应的客户端连接
send_timeout 10; #指定客户端的响应超时时间
#proxy_ #关闭缓存
include vhost. #server 配置文件
新建主机配置文件/etc/nginx/vhost.conf
listen 80;
location / {
/mnt/sd/www/;
index.html index.
在shell中执行/etc/init.d/nginx restart重启nginx,详细的配置信息可以参考。由于去掉了”臃肿”的goagent,内存和存储节省下来的部分可以考虑上个php+mysql,具体的看自己的需求。
Samba 网络共享设置
在模板中注释掉# invalid users = root这行,使用命令smbpasswd -a root为root用户设置单独的共享密码,然后配置下路径就可以在网上邻居中找到了。
编译的时候我们已经选择了ddns-scripts,可以自己选择列表中的服务商,如果你拥有自己的域名,可以参考这篇。
KMS激活服务器
下载最新版本的,从压缩包中找到vlmcsd-mips32el-openwrt-uclibc文件,修改文件名为vlmcsd,并拷贝到/usr/sbin目录,修改文件权限为0755。
建立启动脚本/etc/init.d/kms,并设置文件权限为0755。
#!/bin/sh /mon
# Copyright (C) 2016 XiuMu.org
/usr/sbin/vlmcsd -p /var/run/kms.pid -l syslog -L 0.0.0.0 -P 1688
kill -9 `cat /var/run/kms.pid`
然后执行下面两条命令设置开机自启动就可以了。
/etc/init.d/kms enable
/etc/init.d/kms start
回复邮件通知

我要回帖

更多关于 ss连不上 的文章

 

随机推荐