Skip to content

Commit

Permalink
BackendService: Fix ProxyGuard source port not set to 0
Browse files Browse the repository at this point in the history
The sourceport should only be set in the Linux client as that can
re-use source ports. If we set the source port from common (this was
not documented well by me), the Android client will not be able to
reconnect.

Let's set the source port to zero such that the OS can choose an
available source port for reconnecting
  • Loading branch information
jwijenbergh committed Jun 27, 2024
1 parent 6801044 commit e340d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/nl/eduvpn/app/service/BackendService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class BackendService(

@Throws(CommonException::class)
suspend fun startProxyguard(proxy: ProxySettings) = withContext(Dispatchers.IO) {
val result = goBackend.startProxyGuard(proxy.sourcePort, proxy.listen, proxy.peer)
val result = goBackend.startProxyGuard(0, proxy.listen, proxy.peer)
if (!result.isNullOrEmpty()) {
throw CommonException(result)
}
Expand Down

0 comments on commit e340d31

Please sign in to comment.