webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.37k stars 146 forks source link

webui chromium proxy support #297

Closed osljw closed 6 months ago

osljw commented 6 months ago

remove chromium_options --no-proxy-server, export webui_set_proxy api

fibodevy commented 6 months ago

What about other browsers? API functions should work for all supported browsers, at least for all major browsers.

This is Chromium specific. To make it more general I would suggest making APIs to add new parameters and exclude existing parameteres, eg webui_startup_param_add(window, param) and webui_startup_param_exclude(window, param), so one could add or exclude browser startup parameters. @hassandraga how about that?

hassandraga commented 6 months ago

This PR seems well structured, and webui_set_proxy() will be helpful for some users, especially those who don't want to deal with command lines. Another reason is Firefox does not have friendly command lines to use a proxy, but instead, WebUI needs to modify prefs.js, so webui_set_proxy() will be helpful.

On the other hand, we cannot provide APIs for every browser option, so webui_startup_param_add() and webui_startup_param_exclude() is an excellent idea. I'm going to implement it.

hassandraga commented 6 months ago

Thank you @osljw for this contribution.