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
Rename connection to tunnel #863
Conversation
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.
Can you leave some thoughts as to why Tunnel makes more sense than Connection? Because we can multiplex connections over a single tunnel?
src/electron/index.ts
Outdated
@@ -298,26 +300,26 @@ async function startVpn( | |||
throw new Error('already connected'); | |||
} | |||
|
|||
currentConnection = new ConnectionManager(config, isAutoConnect); | |||
currentConnection = new TunnelManager(config, isAutoConnect); |
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.
currentTunnel?
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.
Good catch, done in 07fcf56.
|
||
## JavaScript API | ||
|
||
```ts | ||
|
||
// Represents a Shadowsocks server configuration. | ||
interface ShadowsocksServerConfig { | ||
interface ServerConfig { |
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.
Did you mean to change this name as well?
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.
Yes, this interface was always ServerConfig
. The documentation was not in sync.
That's right. I think the abstraction fits better with networking terminology (i.e. "apps establish TCP connections over a VPN tunnel", TUN device) and native platform concepts (i.e. Apple's PacketTunnelProvider, our own Android VpnTunnelService). Thank you for the review :) |
* https://github.com/Jigsaw-Code/outline-client: Rename connection to tunnel (Jigsaw-Code#863)
cordova.plugin.outline
and native platform implementations.