Closed denizt closed 2 years ago
The server also works as expected with a gprc-js
client, as that's what the GUI frontend is using. https://github.com/mullvad/mullvadvpn-app/blob/dca39b225e54eecc2309bff371e7f6c5262f5203/gui/src/main/daemon-rpc.ts#L1
Could you please put your reproduction into some github/gitlab repo and license it under some open-source license of your choice? We can't look at any code that does not have a clear license unfortunately.
Sure, added it to the examples in the fork https://github.com/denizt/grpc-dart/tree/mullvad-testcase/example
Same license as the repo, Apache-2.0
I took a quick look. Enabling verbose logging on the server side reveals that it (rightfully so) does not like authority field which grpc-dart
sends. You can work-around by doing ChannelCredentials.insecure(authority: 'localhost')
.
I will make PR which would make grpc-dart
default to localhost
authority when connecting over UDS.
All gRPC calls fail when using UNIX sockets on mullvad-daemon
grpc: 3.0.2
Repro steps
Expected result: TunnelState indicating the state of the VPN
Actual result: HTTP/2 error: Stream error: Stream was terminated by peer (errorCode: 1)
Details
Might be related to https://github.com/grpc/grpc-dart/issues/572 The server is built with https://github.com/hyperium/tonic and works as expected for both rust and grpc-python
mullvad_daemon_test.zip