Skip to content

Commit efead8f

Browse files
committed
cleanup after merge
1 parent 3eb2c7b commit efead8f

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

client/client.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,23 @@ func (c *vpnClient) ResumeVPN() {
208208

209209
// Lantern Server Manager Integration
210210

211+
// AddServerManagerInstance will fetch VPN connection information from the server manager instance and add it to the VPN client as a custom server
212+
// The server manager instance is identified by the tag, ip, port and accessToken.
213+
// The accessToken is used to authenticate the connection to the server manager instance.
214+
// The callback is used to verify the server manager instance's certificate fingerprint.
215+
// If we don't have the fingerprint, we will use the default callback which will ask the user to trust the fingerprint.
211216
func (c *vpnClient) AddServerManagerInstance(tag string, ip string, port int, accessToken string, callback boxservice.TrustFingerprintCallback) error {
212217
return c.customServerManager.AddServerManagerInstance(tag, ip, port, accessToken, callback)
213218
}
214219

220+
// InviteToServerManagerInstance will invite another user (identified by inviteName) to the server manager instance and return the token that can be used to connect to the server manager instance
221+
// The server must be added to the VPN client as a custom server first and have a trusted fingerprint.
215222
func (c *vpnClient) InviteToServerManagerInstance(ip string, port int, accessToken string, inviteName string) (string, error) {
216223
return c.customServerManager.InviteToServerManagerInstance(ip, port, accessToken, inviteName)
217224
}
218225

226+
// RevokeServerManagerInvite will revoke an invite to the server manager instance
227+
// The server must be added to the VPN client as a custom server first and have a trusted fingerprint.
219228
func (c *vpnClient) RevokeServerManagerInvite(ip string, port int, accessToken string, inviteName string) error {
220229
return c.customServerManager.RevokeServerManagerInvite(ip, port, accessToken, inviteName)
221230
}
@@ -232,7 +241,6 @@ func (c *vpnClient) ActiveServer() (*boxservice.Server, error) {
232241
return &activeServer, nil
233242
}
234243

235-
236244
func (c *vpnClient) AddCustomServer(cfg boxservice.ServerConnectConfig) error {
237245
return c.customServerManager.AddCustomServer(cfg)
238246
}

radiance.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -343,24 +343,3 @@ func (lz *lazyDialingRoundTripper) RoundTrip(req *http.Request) (*http.Response,
343343
lz.smartTransportMu.Unlock()
344344
return lz.smartTransport.RoundTrip(req)
345345
}
346-
347-
// AddServerManagerInstance will fetch VPN connection information from the server manager instance and add it to the VPN client as a custom server
348-
// The server manager instance is identified by the tag, ip, port and accessToken.
349-
// The accessToken is used to authenticate the connection to the server manager instance.
350-
// The callback is used to verify the server manager instance's certificate fingerprint.
351-
// If we don't have the fingerprint, we will use the default callback which will ask the user to trust the fingerprint.
352-
func (r *Radiance) AddServerManagerInstance(tag string, ip string, port int, accessToken string, callback boxservice.TrustFingerprintCallback) error {
353-
return r.VPNClient.AddServerManagerInstance(tag, ip, port, accessToken, callback)
354-
}
355-
356-
// InviteToServerManagerInstance will invite another user (identified by inviteName) to the server manager instance and return the token that can be used to connect to the server manager instance
357-
// The server must be added to the VPN client as a custom server first and have a trusted fingerprint.
358-
func (r *Radiance) InviteToServerManagerInstance(ip string, port int, accessToken string, inviteName string) (string, error) {
359-
return r.VPNClient.InviteToServerManagerInstance(ip, port, accessToken, inviteName)
360-
}
361-
362-
// RevokeServerManagerInvite will revoke an invite to the server manager instance
363-
// The server must be added to the VPN client as a custom server first and have a trusted fingerprint.
364-
func (r *Radiance) RevokeServerManagerInvite(ip string, port int, accessToken string, inviteName string) error {
365-
return r.VPNClient.RevokeServerManagerInvite(ip, port, accessToken, inviteName)
366-
}

0 commit comments

Comments
 (0)