Skip to content

Commit

Permalink
Update JVM example to use Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna authored Oct 12, 2023
1 parent 95924f0 commit 23a9727
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/mobileproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ val client = OkHttpClient.Builder().proxy(proxy).build()
https://square.github.io/okhttp/4.x/okhttp/okhttp3/-ok-http-client/-builder/proxy/


### Java
### JVM (Java, Kotlin)

In the JVM, you can configure the proxy to use with [system properties](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html):
```java
System.setProperty("http.proxyHost", "localhost");
System.setProperty("http.proxyPort", "1234");
```kotlin
System.setProperty("http.proxyHost", "localhost")
System.setProperty("http.proxyPort", "1234")
```

Note that this may not fully work on Android, since it will only affect the JVM, not native code. You should also make sure you set this early in your code.
Expand Down

0 comments on commit 23a9727

Please sign in to comment.