예제 #1
0
        public override string ToString()
        {
            string formattedRemoteHost = RemoteHost?.Replace("::ffff:", string.Empty);

            return(Direction == ConnectionDirection.In ? $"{State} {Direction} session {formattedRemoteHost}:{RemotePort}->localhost:{LocalPort}" : $"{State} {Direction} session localhost:{LocalPort}->{formattedRemoteHost}:{RemotePort}");
        }
 public string GetConfigJson()
 {
     return("{ RemoteHost: '" + RemoteHost.Replace("'", "\'") + "', RemotePort: " + RemotePort + " }");
 }