PIA nextgen portforward (#242)
* Split provider/pia.go in piav3.go and piav4.go * Change port forwarding signature * Enable port forwarding parameter for PIA v4 * Fix VPN gateway IP obtention * Setup HTTP client for TLS with custom cert * Error message for regions not supporting pf
This commit is contained in:
@@ -291,7 +291,7 @@ eth0 0002A8C0 0100000A 0003 0 0 0 00FFFFFF
|
||||
}
|
||||
}
|
||||
|
||||
func Test_VPNGatewayIP(t *testing.T) {
|
||||
func Test_VPNDestinationIP(t *testing.T) {
|
||||
t.Parallel()
|
||||
tests := map[string]struct {
|
||||
defaultInterface string
|
||||
@@ -334,7 +334,7 @@ eth0 x
|
||||
filemanager.EXPECT().ReadFile(string(constants.NetRoute)).
|
||||
Return(tc.data, tc.readErr).Times(1)
|
||||
r := &routing{fileManager: filemanager}
|
||||
ip, err := r.VPNGatewayIP(tc.defaultInterface)
|
||||
ip, err := r.VPNDestinationIP(tc.defaultInterface)
|
||||
if tc.err != nil {
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, tc.err.Error(), err.Error())
|
||||
|
||||
Reference in New Issue
Block a user