Ejemplo n.º 1
0
        private VpnState WithFallbackRemoteIp(VpnState state, string remoteIp)
        {
            if (state.Status == VpnStatus.Disconnecting ||
                state.Status == VpnStatus.Disconnected ||
                !string.IsNullOrEmpty(state.RemoteIp))
            {
                return(state);
            }

            return(state.WithRemoteIp(remoteIp));
        }
Ejemplo n.º 2
0
        private VpnState WithFallbackRemoteServer(VpnState state, VpnHost remoteServer)
        {
            if (state.Status == VpnStatus.Disconnecting ||
                state.Status == VpnStatus.Disconnected ||
                !string.IsNullOrEmpty(state.RemoteIp))
            {
                return(state);
            }

            return(state.WithRemoteIp(remoteServer.Ip, remoteServer.Label));
        }