找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: hiboyhiboyhiboy

[2019-03-05]改华硕[N14U N54U]5G 2G的7620老毛子Padavan固件(私人云储存 aria2 QOS)

   火... [复制链接]
发表于 2015-12-25 23:48 | 显示全部楼层
xroot 发表于 2015-12-15 14:24
这个无公网ip 如何通过花生壳内网版搭建 virtual**服务器??

很久以前写的,思路一样。
http://bbs.oray.com/thread-232201-1-1.html

点评

无公网IP建openvpn的方法  详情 回复 发表于 2015-12-25 23:50
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-25 23:50 | 显示全部楼层
101048689 发表于 2015-12-25 23:48
很久以前写的,思路一样。
http://bbs.oray.com/thread-232201-1-1.html

无公网IP建openvirtual**的方法
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2015-12-26 00:06 | 显示全部楼层
anjinghk 发表于 2015-12-25 23:19
@hiboyhiboyhiboy
亲爱的楼主可否做一个纯净版的固件。
然后你把脚本放网络上,我们自己需要什么就复制脚 ...

你把所有脚本清空就好了

这是有洁癖吗?

点评

对啊,有洁癖。哈哈  详情 回复 发表于 2015-12-26 14:00
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 00:25 | 显示全部楼层
本帖最后由 bigandy 于 2015-12-26 19:07 编辑

SS 不用chinadns ,不用pdns 的脚本,获得最高效率和性能。
可以自动更新gfwlist。
这是0.0.1 测试版。

  1. #!/bin/sh

  2. #################################################
  3. # WormHole 0.0.1
  4. # 在PADAVAN固件上进行自动的GFWLIST更新以及SS运行
  5. # 作者: bigandy[andy@cn2k.net]
  6. # 时间: 2015-12-25 10:25:00
  7. #################################################


  8. #准备工作
  9. # 构造 ss-config file.

  10. cat > /tmp/ss.json<<-\EOF
  11. {
  12.     "server": "1.1.1.1",
  13.     "server_port": 5432,
  14.     "local_port": 1008,
  15.     "password": "1234",
  16.     "timeout": 300,
  17.     "method": "chacha20"
  18. }

  19. EOF

  20. #Load ipset modules
  21. modprobe ip_set
  22. modprobe ip_set_hash_ip
  23. modprobe ip_set_hash_net
  24. modprobe ip_set_bitmap_ip
  25. modprobe ip_set_list_set
  26. modprobe xt_set


  27. # check if ss runing
  28. if [ -n "`pidof ss-redir`" ]; then
  29.         killall -9 ss-redir 2>/dev/null
  30. fi
  31. if [ -n "`pidof ss-tunnel`" ]; then
  32.         killall -9 ss-tunnel 2>/dev/null
  33. fi

  34. #restart ss
  35. ss-redir -c /tmp/ss.json -b 0.0.0.0 &
  36. ss-tunnel -c /tmp/ss.json -b 0.0.0.0 -l 8053 -L 8.8.8.8:53 -u &

  37. #build ipset rules
  38. ipset -N gfwlist iphash
  39. iptables -t nat -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1008
  40. iptables -t nat -A OUTPUT -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1008

  41. #add tofirewall script
  42. ipsetrules=`grep gfwlist /etc/storage/post_iptables_script.sh `
  43. if [ -z "$ipsetrules" ] ;then
  44.         echo "ipset -N gfwlist iphash" >> /etc/storage/post_iptables_script.sh
  45.         echo "iptables -t nat -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1008" >> /etc/storage/post_iptables_script.sh
  46.         echo "iptables -t nat -A OUTPUT -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1008" >> /etc/storage/post_iptables_script.sh
  47. fi

  48. #Get gfwlist
  49. wget --quiet -O  /tmp/gfwlist.b64 https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt

  50. #Check if gfwlist has update.
  51. newfilesize=`ls -al /tmp/gfwlist.b64 | awk '{print $5}'`
  52. [ -f /tmp/gfwlist.old ] && oldfilesize=`ls -al /tmp/gfwlist.old | awk '{print $5}'` || oldfilesize=0
  53. [ $newfilesize -gt $oldfilesize ] || exit

  54. #base64 decode
  55. #请用 opkg install coreutils-base64 安装这个包

  56. type base64 >/dev/null 2>&1 || { opkg install coreutils-base64; }
  57. base64 -d  /tmp/gfwlist.b64 > /tmp/gfwlist.txt
  58. mv /tmp/gfwlist.b64 /tmp/gfwlist.old

  59. #补充部分缺失域名

  60. cat >> /tmp/gfwlist.txt <<-\EOF
  61. google.com
  62. google.com.hk
  63. google.com.tw
  64. google.com.sg
  65. google.co.jp
  66. blogspot.com
  67. blogspot.sg
  68. blogspot.hk
  69. blogspot.jp
  70. gvt1.com
  71. gvt2.com
  72. gvt3.com
  73. 1e100.net
  74. blogspot.tw
  75. EOF


  76. #Filter to domainlist
  77. cat /tmp/gfwlist.txt | grep "\." | sed '/\!\|^$\|@@/d' | sed 's/^\.\|^||\|.*:\/\/\|\*.*$//g' | sed 's/^\*\.\|^\*2\.//g' | sed 's/\/.*$//g' |grep "\." |sort |uniq > /tmp/domainlist.txt

  78. #进行dnsmasq 的准备
  79. confdir=`grep conf-dir /etc/storage/dnsmasq/dnsmasq.conf | sed 's/.*\=//g'`
  80. if [ -z "$confdir" ] ;then
  81.         confdir="/etc/storage/dnsmasq/dnsmasq.d"
  82.         echo "conf-dir=$confdir" >> /etc/storage/dnsmasq/dnsmasq.conf
  83.         mkdir -p $confdir
  84. fi

  85. #构造 gfwlist.conf
  86. echo "### Update: $(date)" > $confdir/r.gfwlist.conf
  87. while read line
  88. do
  89. echo "server=/$line/127.0.0.1#8053" >> $confdir/r.gfwlist.conf
  90. echo "ipset=/$line/gfwlist"  >> $confdir/r.gfwlist.conf
  91. done < /tmp/domainlist.txt

  92. logger -t dnsmasq "restart for gfwlist"
  93. restart_dhcpd
复制代码

评分

参与人数 5恩山币 +7 收起 理由
aals + 1 我来恩山就是为了撩你!
85851234 + 1 KP3.5出来了 真是尴尬啊
472870007 + 1 我来恩山就是为了看你!
|▍poison° + 3 期待下版本加入在线更新固件功能
niepan1 + 1 楼主可以加上SS全部转发某几个内网IP的流量吗

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

头像被屏蔽
发表于 2015-12-26 01:00 | 显示全部楼层
问一下亲爱的楼主:
无线桥接里我选择的工作模式是AP-Client(AP被禁用)。 因为上级路由不是我的,没办法固定信道。
现在碰到的问题就是,只要上级路由重启了就变了信道。
试过你的增强功能:可用自动切换中继信号脚本搜寻信道、信号这个脚本。没效果。
求帮助,求教程
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 02:36 | 显示全部楼层
hiboyhiboyhiboy 发表于 2015-12-25 23:02
拔掉你的TF卡试试,只插USB重启,我猜是tf卡影响了

确实刚才把sd卡拿出来全部格式化成一个盘就正常了。终于解决问题了,谢谢老大

点评

我的路由宝也是不认TF卡,adbyby什么的都不能用,我也拿出来重新格式化试试,请问格式化成什么格式?FAT32?还是?  详情 回复 发表于 2015-12-26 02:44
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 02:44 | 显示全部楼层
xiaoyang2530 发表于 2015-12-26 02:36
确实刚才把sd卡拿出来全部格式化成一个盘就正常了。终于解决问题了,谢谢老大

我的路由宝也是不认TF卡,adbyby什么的都不能用,我也拿出来重新格式化试试,请问格式化成什么格式?FAT32?还是?

点评

这我没太留意 应该是NTFS格式的。必须用第三方软件才能格式恢复为默认卡空间大熊,例如DiskGenius  详情 回复 发表于 2015-12-26 16:54
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 09:44 | 显示全部楼层
SS我使用了方案二,并开了Pcap_DNSProxy,我想问下,访问国内域名,是默认用114的DNS还是WAN口获取得的DNS,如果我想自定义国内的DNS,是不是要修改/opt/s-s/dnsmasq.d里的accelerated-domains.china.conf
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 10:12 | 显示全部楼层
楼主你好,请问极1s刷完,路由器时间不能同步,怎么办?

点评

是不是网络不能连接或者SS不正常啊  详情 回复 发表于 2015-12-26 10:39
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 10:39 | 显示全部楼层
yzjdtj 发表于 2015-12-26 10:12
楼主你好,请问极1s刷完,路由器时间不能同步,怎么办?

是不是网络不能连接或者SS不正常啊

点评

网络能连接,就是日志上面的时间还是2014年1月1日,不能移自动联网更新!  详情 回复 发表于 2015-12-26 22:35
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 11:56 | 显示全部楼层
你好!
我遇到了这么个问题:
自己使用“方案二SS+pdnsd+gfwlist(推荐)”,但我还有50多条域名想添加到ss代理中。
首先尝试的是按你在主楼层说的“可添加方案二的gfwlist 内部网络(LAN) - DHCP服务器 - 自定义配置文件 "dnsmasq.servers"
但是我放进去的只要是含有ipset的那一行都报错
  1. 比如这个:
  2. server=/.reddit.com/208.67.222.222#443
  3. ipset=/.reddit.com/gfw_black_list
复制代码
偶数行都报错:
  1. Dec 26 11:02:27 dnsmasq[1524]: illegal option at line 118 of /tmp/dnsmasq.servers
  2. Dec 26 11:02:27 dnsmasq[1524]: illegal option at line 120 of /tmp/dnsmasq.servers
复制代码


然后我直接将这些命令添加到自定义脚本里,重启后是能够正常使用的。但是这个脚本里只能添加大概25条域名(50行)就不能够再输入了。请问下这个有办法解决吗?谢谢!
  1. cat > "/tmp/gfwlist_DOMAIN.txt" <<-\EOF
  2. # 方案二SS的gfwlist添加例子
  3. ...
  4. server=/.reddit.com/208.67.222.222#443
  5. ipset=/.reddit.com/gfw_black_list
  6. ...
复制代码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 13:41 | 显示全部楼层
好厉害。59块的路由器玩出了新高度,感谢!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 14:00 | 显示全部楼层
hiboyhiboyhiboy 发表于 2015-12-26 00:06
你把所有脚本清空就好了

这是有洁癖吗?

对啊,有洁癖。哈哈
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 14:18 | 显示全部楼层
Dec 23 05:49:11 di: 互联网状态:20, 经过时间: s.
Dec 23 05:49:11 连接AP: 20秒后,自动搜寻ap
Dec 23 05:49:31 连接AP: 脚本完成
Dec 23 05:50:10 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
Dec 23 05:50:31 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:50:31 sh_download: 重新下载:【/tmp/small_blank.gif】 URL:【
Dec 23 05:51:30 NTP Client: Synchronizing time to s1a.time.edu.cn.
Dec 23 05:51:47 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:51:47 自定义脚本1: 等待联网后开始脚本
Dec 23 05:52:50 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
Dec 23 05:53:07 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:53:07 sh_download: 重新下载:【/tmp/small_blank.gif】 URL:【
Dec 23 05:54:10 NTP Client: Synchronizing time to s1a.time.edu.cn.
Dec 23 05:54:23 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:54:23 自定义脚本1: 等待联网后开始脚本
Dec 23 05:55:30 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
Dec 23 05:55:43 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:55:43 sh_download: 重新下载:【/tmp/small_blank.gif】 URL:【
Dec 23 05:56:59 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:56:59 自定义脚本1: 等待联网后开始脚本
Dec 23 05:57:20 NTP Client: Synchronizing time to s1a.time.edu.cn.
Dec 23 05:58:19 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:58:19 sh_download: 重新下载:【/tmp/small_blank.gif】 URL:【
Dec 23 05:59:10 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
Dec 23 05:59:35 sh_download: 下载失败:【/tmp/small_blank.gif】 URL:【
Dec 23 05:59:35 自定义脚本1: 等待联网超时
Dec 23 05:59:35 运行路由器启动后: 脚本完成
Dec 23 06:01:00 NTP Client: Synchronizing time to s1a.time.edu.cn.
Dec 23 06:02:49 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
Dec 23 06:04:39 NTP Client: Synchronizing time to s1a.time.edu.cn.
Dec 23 06:05:00 crond[420]: USER admin pid 571 cmd killall EmbedThunderManager &
Dec 23 06:06:29 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
Dec 23 06:08:19 NTP Client: Synchronizing time to s1a.time.edu.cn.
Dec 23 06:10:00 crond[420]: USER admin pid 582 cmd killall oraynewph && killall oraysl &
Dec 23 06:10:09 NTP Client: Synchronizing time to ntp.sjtu.edu.cn.
什么鬼?


我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2015-12-26 14:27 | 显示全部楼层
本帖最后由 bigandy 于 2015-12-26 14:32 编辑

对比一下我们用不同的解决方案实现域名解释的结果:
准备以下3个环境:
1. 北美的一台支持 UDP 转发的 SS server,转发DNS为 google 的8.8.8.8:53
2. 香港的一台支持UDP 转发的SS Server,转发DNS为 google 的8.8.8.8:53
3. openDNS 域名服务器:208.67.222.222:443

首先,我们通过三台服务器分别解析 www.facebook.com的域名
得到以下结果
1. 北美 SS UDP
Address 1: 2a03:2880:f00d:1e:face:b00c:0:25de edge-star-mini6-shv-01-lax3.facebook.com
Address 2: 31.13.70.36 edge-star-mini-shv-01-lax3.facebook.com

IP为 31.13.70.36

2. 香港 SS UDP
Address 1: 2a03:2880:f002:11d:face:b00c:0:25de edge-star-mini6-shv-01-hkg3.facebook.com
Address 2: 31.13.95.36 edge-star-mini-shv-01-hkg3.facebook.com

IP为  31.13.95.36

3. OpenDNS
Address 1: 2a03:2880:f022:1e:face:b00c:0:25de edge-star-mini6-shv-01-sjc2.facebook.com
Address 2: 31.13.77.36 edge-star-mini-shv-01-sjc2.facebook.com

IP 为 31.13.77.36

在香港SS ping 3台 facebook 服务器

ping 31.13.70.36 -c 5
ping 31.13.95.36 -c 5
ping 31.13.77.36 -c 5

1. 北美结果 160ms
2. 香港结果         2ms
3. opendns结果        170ms

在北美的ss ping 3台 facebook 服务器

1. 北美结果   0.5ms
2. 香港结果         159ms
3. opendns结果 10ms

方案对比结论:
如果你的SS服务商支持UDP转发,那么,最优方案是通过 SS 服务器来进行域名解析,我们看到,从香港SS服务器解析获得的IP,在SS服务器上ping 的结果为 2ms,在美国SS服务器上获得解析的IP,ping结果是0.5ms,也就是利用了google 8.8.8.8 对eDNS 的支持,获得离SS服务器最近的CDN服务器IP,这样就会使得你访问目标网站的性能几乎等同于于你到SS服务器之间的性能。
如果采用openDNS做解析,你访问的延时为 你到SS的延时 + SS到目标网站北美CDN的延时
如果采用其他过滤投毒包的方式处理,那么,你访问的延时为 你到SS的延时 +SS到目标网站亚洲CDN的延时,如果不巧你的SS在北美,那么,延时就是翻倍。
但不管怎么说,如果你的SS服务器是自建的,用SS做域名解析在任何情况下,你都不需要担心会造成额外的网络延时。

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-19 15:12

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表