Poor performance on MacOS
I have been using your sstp client on Mac OS (Monterey) for a year or so. Thank you for this project.
There has been discussion over the years about poor performance of sstp on Mac OS. I have experienced this too. The download speed over an sstp connection to a Mikrotik router is about 200KB/s. My actual internet download speed is about 50Mb/s
Using the same internet connection but using the native Windows 10 sstp vpn, I get about 2MB/s.
The discussions seem to point to Apple's pppd as the possible culprit.
I came across a posting on the openfortivpn project from 2019 (https://github.com/adrienverge/openfortivpn/issues/428) about a similar problem with pppd over ssl. Again, after exploring many avenues of investigation Apple's pppd was implicated. Looking at the output of ifconfig -v ppp0 showed the link rate was set at 230.4 KBps
The solution they arrived at was to specify a much higher speed for the tty eg. 3686400. This increased the download speed for the versions of Mac OS tested.
When I looked at sstp-pppd.c I noticed pppd is launched with 38400 as the speed. For Mac OS this causes the ppp0 interface link speed (link rate parameter in ifconfig) to 230.4 KBps.
When I change this to 3686400 the link rate is now 3.69 MBps and the actual download speed I get is about 2.1 MB/s which is about the maximum speed of my link.
I have tested different pppd tty speeds and it not until the value exceeds 230400 that the link rate actually increases.
I think Linux is not affected in this way.
I haven't explored why Apple's pppd behaves this way nor on later Mac OS versions than Monterey but the solution works for me.
Perhaps this could be implemented in sstp-pppd.c for the next version of sstp?
If you have any questions, please do not hesitate to contact me.