Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make VPN work properly over stcpr #523

Merged
merged 5 commits into from
Sep 16, 2020
Merged

Make VPN work properly over stcpr #523

merged 5 commits into from
Sep 16, 2020

Conversation

Darkren
Copy link
Contributor

@Darkren Darkren commented Sep 16, 2020

Did you run make format && make check?
Yes
Fixes #517, partially implements #383

Changes:

  • Callbacks for stcpr/stcp connection establishment implemented;
  • These callbacks are properly used by the VPN client app;
  • Remote IPs for all of the known STCPR transports are now passed to the VPN client on start;

How to test this PR:
Setup VPN connection over STCPR transport

@Darkren Darkren changed the title [WIP] Make VPN work properly over stcpr Make VPN work properly over stcpr Sep 16, 2020
Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well. @nkryuchkov after you review we can merge.

cmd/apps/vpn-client/vpn-client.go Outdated Show resolved Hide resolved
BeforeDialCallback: func(network, addr string) error {
data := appevent.TCPDialData{RemoteNet: network, RemoteAddr: addr}
event := appevent.NewEvent(appevent.TCPDial, data)
_ = eb.Broadcast(context.Background(), event) //nolint:errcheck
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why an error is ignored here instead of returning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkryuchkov dial will be cancelled in case of error, cause callback is fired before dialing

@nkryuchkov nkryuchkov merged commit 8842cd7 into skycoin:develop Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants