如何更改 GeckoFx 代理设置? [英] How do I change GeckoFx proxy settings?
问题描述
我使用的是 GeckoFx 1.9.1.0 版,Mozilla XULRunner 12.0 版.
I'm using GeckoFx version 1.9.1.0, Mozilla XULRunner version 12.0.
推荐答案
帮助使用代理用户名 &通过 GeckoFX?请参阅此答案以编程方式设置代理.您可以使用方法 GeckoPreferences.Save(string fileName)
和 GeckoPreferences.Load(string fileName)
Help With Proxy Username & Pass with GeckoFX?
See this answer for setting proxies programmatically. You can save and load the preferences to a file using the methods GeckoPreferences.Save(string fileName)
and GeckoPreferences.Load(string fileName)
使用 XULRunner 12,您不能存储首选项,直到您使用 XULRunner 创建任何应用程序(参见:https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences)
With XULRunner 12, you can't store preferences until you create any apps using XULRunner (see this: https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences)
在 xulrunner 默认配置文件中手动插入代理设置:(XULRunner ~1.9)
转到 d:\path\to\xulrunner\defaults\pref
Goto d:\path\to\xulrunner\defaults\pref
打开 xulrunner.js
,添加您想要放置的首选项.
Open the xulrunner.js
, add the preferences you'd like to put.
现在,您可以按照文件末尾的以下示例调用添加首选项:
Now, you can add preferences by following the below sample call at the end of the file:
pref("network.proxy.http", "web-proxy.domain.com");
pref("network.proxy.http_port", 8080);
pref("network.proxy.type", 1);
如果您不知道确切的首选项是什么,或者您想知道所有首选项,请使用您的 GeckoWebBrowser
,导航到 about:config
.
If you don't know what are the exact preferences or you want to know all the preferences, using your GeckoWebBrowser
, navigate to about:config
.
例如: geckoWebWebBrowser.Navigate("about:config");
.
如果浏览器告诉这将使保修失效"
,请点击我明白.."
.现在,您可以看到列出的所有首选项.
If the browser tells "This'll Void Warranty"
, click "I understand .."
.
Now, you can see all the preferences listed.
这篇关于如何更改 GeckoFx 代理设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!