kittoku / Open-SSTP-Client

Open SSTP Client for Android
MIT License
402 stars 104 forks source link

Disconnects every 10 minutes #107

Closed omidshojaee closed 1 year ago

omidshojaee commented 1 year ago

I have my own SoftEther server hosted on Amazon Lightsail with SSTP configured. Certificate is valid.

I have installed Open SSTP Client from Play store and just set the Hostname, Username and Password. Everything else is default.

It disconnects after around 10 minutes. I have tried 4 times. Here's the log:

[2023-06-11 01:02:02.930] Establish VPN connection
[2023-06-11 01:15:00.700] OSC: ERR_UNEXPECTED
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:117)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:161)
    at kittoku.osc.terminal.SSLTerminal.send$app_debug(SSLTerminal.kt:339)
    at kittoku.osc.terminal.SSLTerminal.sendDataUnit$app_debug(SSLTerminal.kt:360)
    at kittoku.osc.client.SstpClient$launchJobControl$2.invokeSuspend(SstpClietnt.kt:36)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

[2023-06-11 01:15:17.113] Terminate VPN connection

I have another app called VPN Client Pro which has SSTP. With this app, connection to same server works for at least an hour. Here's the log of that:

2023-06-11 00:00:33 VpnClientPro-google-api27-release-1.01.39 (23010139)
2023-06-11 00:00:33 Connecting request by user
2023-06-11 00:00:33 OpenSSL 3.0.8 7 Feb 2023
2023-06-11 00:00:33 Connecting to x.x.x.x:443
2023-06-11 00:00:33 Set TLS SNI extension to "sstp.mydomain.com"
2023-06-11 00:00:34 TLSv1.3 connection established with cipher TLS_AES_256_GCM_SHA384
2023-06-11 00:00:35 MSCHAPv2 authentication completed
2023-06-11 00:00:35 IPCP peer address 1.0.0.1
2023-06-11 00:00:36 IPCP local address 192.168.30.10
2023-06-11 00:00:36 IPCP primary dns 9.9.9.9
2023-06-11 00:00:36 IPCP secondary dns 4.2.2.4
2023-06-11 00:00:36 Connected
2023-06-11 00:54:54 Disconnecting request by user
2023-06-11 00:54:54 Disconnecting...
2023-06-11 00:54:55 Disconnected

The only difference I see is the TLS version and it makes sense to me because I live in a region where ISPs drop TLS packets if v1.1 or v1.2 are used.

If my understanding is correct, I'd appreciate if you add v1.3.

Thank you.

kittoku commented 1 year ago

You can specify a TLS version in SSL Version.

omidshojaee commented 1 year ago

I don't see v1.3. I have Default, v1, v1.1 and v1.2.

kittoku commented 1 year ago

So you cannot use TLS v1.3 in this app. Sorry.