How do I change GeckoFx proxy settings?

不想你离开。 提交于 2019-12-24 10:58:42

问题


I'm using GeckoFx version 1.9.1.0, Mozilla XULRunner version 12.0.


回答1:


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)

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)

To insert proxy settings manually in the xulrunner default profile:(XULRunner ~1.9)

Goto d:\path\to\xulrunner\defaults\pref

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);

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.

For example: geckoWebWebBrowser.Navigate("about:config");.

If the browser tells "This'll Void Warranty", click "I understand ..". Now, you can see all the preferences listed.



来源:https://stackoverflow.com/questions/13503226/how-do-i-change-geckofx-proxy-settings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!