Skip to content

Commit bee466b

Browse files
committed
Add proxy docs to README
1 parent e84f161 commit bee466b

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,26 @@ Commands:
222222
state.webSettings.customUserAgentString = "MyApp/1.2.3"
223223
```
224224

225-
Desktop note:
225+
226+
227+
### Proxy (desktop only)
228+
229+
```kotlin
230+
// HTTP CONNECT Proxy
231+
state.webSettings.desktopWebSettings.proxyConfig = ProxyConfig.Http("proxy.tld", 8888)
232+
// SOCKS5 Proxy
233+
state.webSettings.desktopWebSettings.proxyConfig = ProxyConfig.Socks5("proxy.tld", 1080)
234+
```
235+
236+
Proxy is only supported on Windows, macOS 14.0+ and Linux.
237+
238+
Desktop note on both user-agent and proxy:
226239

227240
* applied at creation time
228241
* changing it **recreates** the WebView (debounced)
229242
* JS context/history may be lost
230243

231-
👉 Set it early.
244+
👉 Set them early.
232245

233246
---
234247

0 commit comments

Comments
 (0)