Chrome中可以使用switchtunnel插件访问socks 5代理,那么当我开始使用emacs + conkeror浏览网页的时候,我可不希望再切换到chrome访问google.
经过一些尝试后,搞定。
基本思路是:
1. 首先用Firefox的设置UI,允许Fireforx访问本地的socks 5代理
Preferences/Advanced/Network/Connection Settings/
2. 在Firefox URL中输入about:config 命令,然后找出所有包含proxy的配置:
3. 在conkeror中C-x-f, 也输入about:config, 也用proxy搜索,最后保证设置和firefox中的一样。
conkeror会将结果保存在~/.conkeror.mozdev.org/conkeror/ncvcfckw.default/prefs.js
# Mozilla User Preferences/* Do not edit this file. * * If you make changes to this file while the application is running, * the changes will be overwritten when the application exits. * * To make a manual change to preferences, you can visit the URL about:config */user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1417887372);user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1417887492);user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1417942592);user_pref("browser.cache.disk.capacity", 358400);user_pref("browser.cache.disk.smart_size.first_run", false);user_pref("browser.cache.disk.smart_size.use_old_max", false);user_pref("browser.cache.disk.smart_size_cached_value", 358400);user_pref("browser.download.importedFromSqlite", true);user_pref("extensions.blocklist.pingCountVersion", 0);user_pref("extensions.databaseSchema", 16);user_pref("extensions.lastAppVersion", "1.0pre1 (Debian-1.0~~pre-1+git141025-1)");user_pref("extensions.lastPlatformVersion", "30.0");user_pref("extensions.shownSelectionUI", true);user_pref("idle.lastDailyNotification", 1417942712);user_pref("network.cookie.prefsMigrated", true);user_pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, .letv.com, .baidu.com, .leshiren.com, .qq.com, .csdn.net");user_pref("network.proxy.share_proxy_settings", false);user_pref("network.proxy.socks", "127.0.0.1");user_pref("network.proxy.socks_port", 8528);user_pref("network.proxy.type", 1);user_pref("places.database.lastMaintenance", 1417743790);user_pref("places.history.expiration.transient_current_max_pages", 100529);user_pref("plugin.importedState", true);user_pref("storage.vacuum.last.index", 1);user_pref("storage.vacuum.last.places.sqlite", 1417743790);user_pref("toolkit.telemetry.previousBuildID", "[email protected]_1417603046");
注意,不要手动编辑该文件。
现在可以使用了。
如果想关掉proxy,可以将下面的变量设置为0
network.proxy.type