Re: [Feature request] Map hostnames to IP addresses
Fabian Keil <[email protected]>
| Newsgroups | gmane.comp.web.privoxy.devel |
|---|---|
| Message-ID | <[email protected]> |
Betty <[email protected]> wrote: > Some domains (for example, many Google services) are blocked in China and > they won't resolve to the correct IP addresses. If we specify the correct > IPs to those domains in the "hosts" file > (C:\Windows\System32\drivers\etc\hosts), we can visit those sites. > The problem with the hosts file is that it does not support wildcards. We > have to write many lines in the hosts file like this: > 203.208.46.200 0.docs.google.com > 203.208.46.200 1.docs.google.com > 203.208.46.200 2.docs.google.com > 203.208.46.200 3.docs.google.com > 203.208.46.200 4.docs.google.com > 203.208.46.200 5.docs.google.com > 203.208.46.200 6.docs.google.com > 203.208.46.200 7.docs.google.com > 203.208.46.200 8.docs.google.com > 203.208.46.200 9.docs.google.com > This is only a small fraction. The actual file has hundreds of lines. > Google uses a lot of domains! > > My feature request is to let Privoxy have the ability to map certain > hostnames to certain IP addresses, while supporting wildcards. Hopefully we > won't need the hosts file and we can write in Privoxy's action file > something like: > > 203.208.46.200 *.docs.google.com > > (Please note that 203.208.46.200 is not a proxy. It is an IP used by > Google. Using "forward" in Privoxy does not work.) > > Is that possible? Thank you. Yes that's already possible using the client-header-filter directive: http://config.privoxy.org/user-manual/actions-file.html#CLIENT-HEADER-FILTER If you add a filter like the following to one of your filter files: CLIENT-HEADER-FILTER: rewrite-to-203.208.46.200 Rewrite the request destination to 203.208.46.200 and keep the Host header unmodified. May or may not fool the GFW of China. s@^(\w+) (http://)?([^/ ]+?)([/ ])@$1 $2\203.208.46.200$4@ You can enable it in one of your action files with something like: {+client-header-filter{rewrite-to-203.208.46.200}} .docs.google.com/ Note that Privoxy can also be used with Tor, though: http://www.privoxy.org/faq/misc.html#TOR Tor provides censorship resistance out of the box: https://www.torproject.org/ Fabian ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Ijbswa-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ijbswa-developers
signature.asc
(application/pgp-signature, 834 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBCAAGBQJROI+zAAoJEGkYIpGLojccZdUP/2cOaP9/x/4QRy5QGOQF92pN TgA0Y2pKJ7c6gu8KMJ4ImmqFwsk3Wwbscbcb+cxLMqhlOiMlL7mMRLFdUYto7/Vs xrm2/FfgSG1d1jiLW/SJk92A9yQuBicuBNtqzMDdUBI7LsozIeJ8CFLt8L5MJUi2 gFXuvEUbhID9v1yARR4a22l2oZZAru8wEnYloU/OIy3/TIJ4FX8BbjdTxrwpl7bo weAnKpZY1WORp8qhsI5ifvhB+HaPadGbuY1OOAeQ9iYricFgvwh1u+eoOkbjeuLs FmYwAbVLy5L3X1AeJMWZ8v3niHiL50j5QjypUrpU5OJEusfHzNhzINeO9Wm/e/JH Z93jsTcgl/6tpQODSApN0GFr+oHy/PwcT1kaCi+BkaIr/4Q1JC++QcTEaHCMWRDK HRYxVeoPePJ0mTUSZKP4ty7MQ6QUF+agdxLDDH4hnlO82y3Zq65ZeDqLB288qpmJ 5Y6tn7zNZx6vBXaJOa1QZKVFf5wOxOe/Hi0JtBB9wvObkJ2IDGVFtgA6i30kKJHa gi0nhoGA3rc7q65f5rcFgybj72L2bbZ1UWyzWa3GLkFlWsd3Z7wFPCTh8ox2mflD Fo62UoCDjsaKkPk3OWHQozrwpO8y9trt7hOcnufxp677kdSp0VvraZocNa5vdV0v MHbwmnmC7lJIato9JmnZ =+z7j -----END PGP SIGNATURE-----