public void AddForward(ForwardEntry entry) { if (!entry.ConnectAddress.StartsWith(LocalPrefix)) { throw new InvalidOperationException("Should be local address"); } Console.WriteLine(Run("interface portproxy add v4tov4 listenaddress={0} listenport={1} connectaddress={2} connectport={3}", GetIP(), entry.ListenPort, entry.ConnectAddress, entry.ConnectPort)); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ForwardEntry obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public bool DeleteEntry(ForwardEntry entry) { Connector.RemoveForward(entry.ListenPort); return(true); }
public bool AddEntry(ForwardEntry entry) { Connector.AddForward(entry); return(true); }