{"id":13434632,"url":"https://github.com/n0wa11/gfw_whitelist","last_synced_at":"2025-03-18T01:31:47.093Z","repository":{"id":6021170,"uuid":"7244831","full_name":"n0wa11/gfw_whitelist","owner":"n0wa11","description":"A Pac File of the Whitelisted Websites for the Great Firewall of China (GFW)","archived":false,"fork":false,"pushed_at":"2017-05-31T02:22:34.000Z","size":461,"stargazers_count":705,"open_issues_count":3,"forks_count":195,"subscribers_count":59,"default_branch":"master","last_synced_at":"2024-10-27T17:23:35.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n0wa11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-19T17:53:15.000Z","updated_at":"2024-10-25T10:11:42.000Z","dependencies_parsed_at":"2022-08-26T20:02:37.982Z","dependency_job_id":null,"html_url":"https://github.com/n0wa11/gfw_whitelist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0wa11%2Fgfw_whitelist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0wa11%2Fgfw_whitelist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0wa11%2Fgfw_whitelist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0wa11%2Fgfw_whitelist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n0wa11","download_url":"https://codeload.github.com/n0wa11/gfw_whitelist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244139272,"owners_count":20404483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:00:19.358Z","updated_at":"2025-03-18T01:31:46.794Z","avatar_url":"https://github.com/n0wa11.png","language":"JavaScript","funding_links":[],"categories":["WeChat","Categories","\u003ca id=\"af9d2b4988d35a2a634c042a1c66bb8c\"\u003e\u003c/a\u003e工具","JavaScript"],"sub_categories":["Mini Program","Firewall analysis","\u003ca id=\"e9cc4e00d5851a7430a9b28d74f297db\"\u003e\u003c/a\u003eGFW"],"readme":"# GFW 白名单\n\n\n概述 \n-----\n\n著名的 [autoproxy.pac](https://autoproxy.org) (GFW List)  是一个 GFW 黑名单，访问名单中网站需要通过代理，不在名单中的网站直接访问。有效使用黑名单，维护者和用户都需要时常更新此名单，否则可能不能访问最近被墙的网站。这些不便之处是推广翻墙运动的阻碍之一。\n\n白名单的方法是白名单中的网站不走代理，其它网站全部通过代理访问。白名单的优点是对维护的要求非常低。第一次安装后，即使很长时间不更新，也不会出现网站打不开的问题。当然，用户会要付出稍多一些流量。\n\n现实上 GFW 已经开始白名单化，国外稍微有点意思的网站大都已经被墙，或者随时可能被墙。因此作者认为有必要开始维护一份白名单的 pac 文件。\n\n***作者收录的国内 CDN 和“云”相关的域名还非常有限。希望同学们能够帮助补充。感谢。***\n\n使用方法\n---------\n\n下载 whitelist.pac 文件后，修改代理服务器的 ip 地址和代理类型。然后将浏览器的代理设置中指向 whitelist.pac。\n\n\n```\nvar ip_address = 'www.abc.com:443'; // 需要更换成有效的域名\n```\n\n```\nvar proxy_type = 'HTTPS'; // or 'SOCKS5'\n```\n\n当 `proxy_type`  选为 `HTTPS` 时，此 pac 文件适合用于 [Google Chrome 的安全代理](http://www.chromium.org/developers/design-documents/secure-web-proxy)。\n\n![使用 pac 文件](img/chrome-pac.png)\n\n\n### SSH/Goagent/http 代理设置\n\n谈一点题外话，不少网友通过 SSH(Tunnelier/Entunnel) 等本地 socks5 代理或者 goagent 等本地 http 代理来翻墙。\n\n假设 SSH 开的本地端口是 7070，goagent 的本地端口开在 8087，\n\n```\n'SOCKS5 127.0.0.1:7070';\n```\n```\n'HTTP 127.0.0.1:8081';\n```\n\n只需要将下面那个地址，直接贴入上图中 “Auto Config URL” 那个位置，,\n就可以用上这个白名单了。\n\n```\nhttps://github.com/n0wa11/gfw_whitelist/raw/master/examples/whitelist_socks5_7070.pac\n```\n```\nhttps://github.com/n0wa11/gfw_whitelist/raw/master/examples/whitelist_http_8081.pac\n```\n\n\n\nGoogle Chrome 安全代理 （SSL Secure Proxy）\n-----------\n\n_Firefox 好像也有支持安全代理了。作者还没有测试过。_\n\n\nGoogle Chrome 已经支持基于 https 和 SPDY 的安全代理。其原理和效果与 SSH，shadowsocks 以及 goagent 类似：\n\n* 将普通流量封装在加密通道之中，这样 GFW 就看不见流量的内容；\n* 域名的解析在代理服务器这端完成，所以本地不用担心域名污染的问题。配合 pac 的使用，可以享受国内 CDN 的服务。达到一次设置完全免维护；\n* 本地不从服务器端取得 ip，只适合浏览器内的应用，不适合 VoIP，网络游戏等应用。\n\n优点有：\n\n* 在 PC 和 Mac 上 Chrome 已经原生支持，不需要依赖额外的客户端；\n* 封装的协议是 https 或 SPDY，GFW 完全没有 DPI 识别的可能，这是翻墙终极方案的一部分；\n* 由 Google 支持，客户端和服务器端的软件成熟并且稳定，未来更新也可靠。\n\n现有的缺点有：\n\n* 暂时只适用于 PC 和 Mac 上的 Chrome。 Android 的客户端有待开发。iOS 客户端的可行性暂时还不清楚。\n\n***有兴趣开发客户端的同学，可以考虑编译封装 @tatsuhiro-t 的 C 程序库 [spdylay](https://github.com/tatsuhiro-t/spdylay) 。***\n\n```\nshrpx --client-proxy [-b \u003cHOST,PORT\u003e] [-f \u003cHOST,PORT\u003e] \n\t\t\t\t   [OPTIONS...] [\u003cPRIVATE_KEY\u003e \u003cCERT\u003e]\n```\n\n\n其它节省流量的方法\n----------------\n\n\n由于白名单的流量消耗较黑名单要高一些，在浏览器中安装下面的扩展，在提高网页浏览速度的同时，也能节省不少流量。\n\n##### 屏蔽广告： Adblock Plus ＋ Easylist ＋ Chinalist\n\n在 Firefox 或 Chrome 中安装 [Adblock Plus](http://adblockplus.org/en/) (ABP) 扩展，并在 ABP 的控制面板中加入 Easylist 和 [Chinalist](http://code.google.com/p/adblock-chinalist/)。这样可以有效的过滤广告大部分网站和网页。\n\n`注意`：下载扩展和 ChinaList 的时候可能需要打开全局翻墙的 VPN 。\n\n##### 屏蔽Flash： FlashControl 或 FlashBlock\n\n在 Chrome 中安装 [FlashControl](https://chrome.google.com/webstore/detail/flashcontrol/mfidmkgnfgnkihnjeklbekckimkipmoe) 或在 Firefox 中安装 [FlashBlock](https://addons.mozilla.org/zh-cn/firefox/addon/flashblock/)，可以达到屏蔽 Flash 的效果。需要打开 Flash，比如视频，只要在被屏蔽的 Flash 上点击一次。\n\n![Chrome 的扩展](img/chrome-extension.png)\n\n------\n\n© 2012-2013 n0gfwall0@gmail.com，MIT License。 本文档使用了 [Mou](//mouapp.com) 和 [Marked](http://markedapp.com) 进行编辑。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0wa11%2Fgfw_whitelist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0wa11%2Fgfw_whitelist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0wa11%2Fgfw_whitelist/lists"}