-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
打造簡便unblock youku路由器(使用openwrt + privoxy) #106
Comments
unblock youku路由器進階篇, 區域網絡下所有裝置全自動解鎖! 本文是 簡便unblock youku路由器 的進階應用 通過更改DNS返回的IP 把要解鎖url的域名指向privoxy架設的反向代理IP 以下說明比較簡要, 但我想會一點*UNIX的都應該明白 要求: 1 SSH進去路由, 然後輸入指令安裝 privoxy
2 把規則文件及reverseproxysetting設定文件放到 /etc/privoxy https://github.com/karlcheong/unblock_youku_privoxy_rules 3 輸入指令啟動 privoxy
(可選:)輸入指令, 使路由啟動時自動運行 privoxy 代理
4 修改/etc/init.d/dnsmasq Dnsmasq啟動腳本, 在 第518行 done 的下面加上以下2句
即是修改成這樣子:
5 打開 /etc/privoxy/basehosts, 把里面的IP 192... 全部替換成你路由器的區域網IP 6 修改 /etc/dnsmasq.conf Dnsmasq設定文件, 加入一行新的設定
7 重啟Dnsmasq 即可
PS: 如果想限制privoxy只能代理需要解鎖之域名, 不代理其他網站, 請打開 /etc/privoxy/config PPS: |
@karlcheong 我可以给你提供个 digitalocean 的 vps 另外想到有一些域名下面内容并不是全部都通过代理的,而且代理服务器也有权限控制 |
權限管制 我用privoxy 重點是因為它夠小巧簡單,沒有什么dependencies, 適合個人家庭使用 至於用在公共反向代理得好好想想會有什么問題 這對VPS的網速/流量要求比pac正向代理的要求高得多 ref: http://www.privoxy.org/user-manual/ Privoxy設定說明 |
Latest Update: |
请教一下,其实 /etc/privoxy 是那里? |
openwrt的檔案系統中的/etc/privoxy, 放privoxy的設定文件的 @simonleungs 如果你現在有更多問題問的話, 可以給你的即時通信工具/EMAIL地址/facebook/twitter ..等等 |
谢谢你~可以怎麽找你 |
@simonleungs 你有沒有Skype/Facebook/QQ之類的IM號, 有問題問的就給來我加你 |
skype : simonleungs |
你好 |
@kevinyang9999 |
SORRY,現在看到了 再問一下config中 |
@kevinyang9999 而listen-address 192.168.1.1:80 要做反向代理的話,有以下地方注意 (最終反向代理效果= android免root免設定代理即可unblock) |
请问可以基于privoxy做一个替换优酷土豆奇艺播放器以达到去广告目的规则吗?目前使用替换方法的都是chrome插件或者油猴脚本,IE或不支持油猴脚本的没办法使用。 |
@xiozf |
我用tomato, 没有/etc/init.d/ 怎么弄? |
@zhumingvictor |
你好 第六步我不是很明白 6 修改 /etc/dnsmasq.conf Dnsmasq設定文件, 加入一行新的設定 请问 addn-hosts=/etc/privoxy/basehosts 这一行加在dnsmasq.conf 哪一行 可否给个实例文件 谢谢 |
@hihitoni |
谢谢! 因在国外,源于视频地区得限制而不能观看,太苦B了。支持。 tonizhou 在 2013-11-2,4:32,"karlcheong" notifications@github.com 写道:
|
謝謝! |
請問"進階版"我再WIN7上騰訊的偶而會成功,優酷沒成功過一次,安卓上更慘,優酷APP的列表都看不到,想先問是規則太舊要更新嗎? |
@karlcheong 今天把路由器刷成 openwrt 試了下你的這個方法,遇到些麻煩,在重啓 DNS 服務的時候有問題,我的手機仍然不能看優酷。 最後加上的那句 addn-hosts=/etc/privoxy/basehosts 提示 not found,但是在 /etc/privoxy/basehosts 是存在的。不知何解…… |
@whuhacker @shine12 |
@karlcheong 確實搞錯了,我改回了重啓 DNS 沒問題了。不過又有新狀況 訪問其他頁面沒問題,只要是需要代理的頁面就會出現 No such file or directory…… 另外我看到你在 cnforward.action 裏寫定了
是因爲它死掉了嗎?我換成了上面的
也不行 |
1 第一次看到的盒子呢..可能是該程式有自己的方法設定proxy (在設定檔里?), 又或者根本不支持proxy? 2 4步 是因為 dnsmasq 啟動時, 它的init script會修改 resolv.conf 里的dns 設定到 127.0.0.1 (就是dnsmasq自己).
wan up script 看 這里 |
多谢指点. 我会试一下. |
http://sports.cntv.cn/live/cctv5/ is not working anymore. Does it correct? |
@bebeboy |
Let say http://www.yyets.com/ and I want to remove the left advertisement. |
@bebeboy for removing ads on yyets homepage actionfile:
filterfile:
|
多谢指教。 |
@kukat I use RT-N56U too, until reading the source from https://code.google.com/p/rt-n56u/, I found that the logic adding “nameserver 127.0.0.1” into /etc/resolv.conf was hardcoded in the binary code of /sbin/rc, there is no way to avoid that. The way I solved it, was to rebuild the /etc/resolv.conf file in /etc/storage/started_script.sh, but it also means you lost the capability to change the DNS servers from web GUI.
echo nameserver 8.8.8.8 > /tmp/resolv.conf
mtd_storage.sh
|
I've tried configured everything with reverse proxy settings but still doesn't work. I also tried "http://ipservice.163.com/isFromMainland" to verify on my computer and the return is false. How can I verify if my settings is working? Or at least, to know if it goes through privoxy properly? I think my question is that all devices do not need configuration? if I don't configure the browser to use the privoxy's port, it doesn't work. How can I make it work w/o configuration change on devices? I'm kind of confused. More detail. I checked the dnsmasq and it does load the basehosts. root@OpenWrt:/tmp# dnsmasq -C /var/etc/dnsmasq.conf -d Then I checked the dns resolving from my computer and it does resolve fine to my router local net ip. Leo-rMBP:~ sliu$ dig ipservice.163.com ; <<>> DiG 9.8.3-P1 <<>> ipservice.163.com ;; QUESTION SECTION: ;; ANSWER SECTION: ;; Query time: 25 msec However, I don't see any activity in the privoxy log. It seems it does nothing and the privoxy does listen on port 80 on router. Somehow, request to the privoxy seems not doing anything. Any hints on the problem? Thanks. |
感謝樓主的文章跟 rule, 昨天在家裡的 openwrt 測試 reverse proxy 成功了。
|
ddwrt可以吗? 能post一下你的详细步骤吗? On Thursday, January 8, 2015, akpotter notifications@github.com wrote:
|
@bba56k 如果是只改dnsmasq 把特定域名指向我們的代理的話還好, 相比openwrt,因為ddwrt的系統分區是唯讀的,所以軟件包和設定只能放在路由內置jffs2分區/USB/samba上。 簡單來說,要用ddwrt弄privoxy的話,假設你的路由有足夠內置jffs2空間/USB記憶棒,我會這樣做:
3 在boot script 再運行一個 標準設定的 dnsmasq ,只監聽 lo 本機介面 |
你的openwrt路由器已经自动代理了? 任何连接的客户端都自动走unblock youku? 盒子上,什么也不用设置? 能把你参考的文章链接或者@我一下吗? 多谢
|
@bba56k 在上面每一步我都解釋了目的, 所以你也可以通過自己的方法做, 能達成效果就可以 |
@kukat 请教下我也是在N56U第三方固件上安装privoxy,但因没有/etc/init.d/privoxy不知如何启动,请问怎么弄好 |
@biankasyo 如果你是用的 OpenWRT 固件,可以使用官方的包管理系统进行安装
|
@whuhacker 多谢指教,本体固件是俄罗斯Padavan编写的改版华硕固件,自行安装entware后,安装privoxy,现已启动成功,已将basicsetting中的config及trust复制到etc/privoxy下,但不知为何8123依旧失败 |
请问楼主的路由器型号?可以 推荐几款吗? 谢谢
|
之前8123端口无法成功, |
貌似YOUKU已经更新了,这个proxy服务器不能用了。unblock youku插件还可以用(最近更新过)。求大神更新啊! |
請問這個方式現在還可以使用嗎 |
Port 80 不能用啊! 3.18. Can I just set Privoxy to use port 80 and thus avoid individual browser configuration? No, its more complicated than that. This only works with special kinds of proxies known as "intercepting" proxies (see below). |
if you are using version 3.0.23-3, you should change this file /etc/init.d/privoxy line 113, |
能post一下你的详细步骤吗? |
感謝樓主的文章. 昨天在家裡的 dd-wrt kong arm r7000 运用 entware-ng 測試 reverse proxy 成功了. |
请问这个是不是只针对80端口的HTTP, 443的HTTPS可以用吗? |
記得很久前有人就問過 在路由器如何設置Unblock Youku
後來更有一篇教程, 通過squid來達成Unblock Youku功能
對於一般家居用的路由器來說,都是基於MIPS LE(Boardcom)或MIPS BE(Atheros)
unblock youku伺服器使用之Node.js對MIPS支援性很差, 很難用來運行轉發代理
而 squid 倒是可以在家用路由器運行, 不過一來squid設定複雜我不會設, 二來
我正好在 #80 中為了給Android也能解鎖, 用privoxy 運行轉發代理
可以直接把設定搬過來用, 所以這個教程使用的軟件為privoxy
要求:
已安裝OpenWRT系統的路由器
1 SSH進去路由, 然後輸入指令安裝 privoxy
opkg update
opkg install privoxy
2 把規則文件及basicsetting設定文件, 放到 /etc/privoxy
https://github.com/karlcheong/unblock_youku_privoxy_rules
3 輸入指令啟動 privoxy
/etc/init.d/privoxy start
(可選:)輸入指令, 使路由啟動時自動運行 privoxy 代理
/etc/init.d/privoxy enable
4 把要解鎖的裝置設定代理為 路由區域網IP:8123
The text was updated successfully, but these errors were encountered: