index.md (1746B)
1 Proxy Config 2 ============ 3 4 Description 5 ----------- 6 7 This patch allows you to specify proxy settings in your `config.h` file. 8 9 It supports the three proxy modes in Webkit: 10 11 * CustomProxy: specify a custom proxy URL and list of hosts to ignore. 12 * SystemProxy: use your desktop environment proxy settings or `http_proxy` environment variable. 13 * NoProxy: ensures that a proxy is never used. 14 15 Usage 16 ----- 17 18 Once the patch is applied, modify the ProxyMode, ProxyUrl and ProxyIgnoreHosts variables as required. For example, if using a custom proxy server then the variables might be set as: 19 20 [ProxyIgnoreHosts] = { { .v = (char *[]){ "localhost","local.lan",NULL } }, }, 21 [ProxyMode] = { { .i = CustomProxy }, }, 22 [ProxyUrl] = { { .v = (char *) "http://proxy.local.lan:8080/"}, }, 23 24 The default value is SystemProxy, which preserves the default behavior of surf. 25 26 Note that the SystemProxy mode will not respect your ProxyIgnoreHosts list. 27 28 FreeBSD Ports 29 ------------- 30 31 To apply this patch to the `www/surf` port on FreeBSD, create the `files` directory within the port directory and copy the patch into it. If you have your own pre-defined `config.h` file, you can build and install the port using the using the `SURF_CONF=/path/to/surf/config.h` `make` variable. Otherwise, run `make patch` to apply the patch to the source files, edit `work/surf-VERSION/config.def.h`, set the variables as required and then build and install the port as per usual. 32 33 Download 34 -------- 35 36 * [surf-proxyconfig-20240905-9ef79b.diff](surf-proxyconfig-20240905-9ef79b.diff) 37 38 Reference 39 --------- 40 41 * [Webkit Network Proxy Settings Reference](https://webkitgtk.org/reference/webkit2gtk/2.35.1/WebKitNetworkProxySettings.html) 42