-
Notifications
You must be signed in to change notification settings - Fork 351
Mobile node connections configuration is optional now #565
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * Copyright (C) 2018 The "MysteriumNetwork/node" Authors. | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| package mysterium | ||
|
|
||
| import ( | ||
| "errors" | ||
|
|
||
| "github.com/mysteriumnetwork/node/core/connection" | ||
| ) | ||
|
|
||
| // TODO this probably can be aligned with openvpn3 setup interface as its very close to android api, but for sake of | ||
| // package independencies we are not reusing the same interface although implementation is rougly the same | ||
| type tunnSetupPlaceholder interface { | ||
| Establish() int | ||
| } | ||
|
|
||
| // WireguardTunnelSetup represents interface for setuping tunnel on caller side (i.e. android api) | ||
| type WireguardTunnelSetup tunnSetupPlaceholder | ||
|
|
||
| // OverrideWireguardConnection overrides default wireguard connection implementation to more mobile adapted one | ||
| func (mobNode *MobileNode) OverrideWireguardConnection(wgTunnelSetup WireguardTunnelSetup) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why to call it Override? Its simple connection through our bridge.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because it exactly what it does - overrides default "openvpn" connection configured in node |
||
| mobNode.di.ConnectionRegistry.Register("wireguard", func(options connection.ConnectOptions, channel connection.StateChannel) (connection.Connection, error) { | ||
| return nil, errors.New("not implemented yet") | ||
| }) | ||
| } | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can call it
MobileOpenvpnConnection. From user standpoint he is not overriding anything..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above