Unmask more safe things
- IPv4/6 address and default gateway within VPN - Route destination and gateway
This commit is contained in:
parent
6b42048d6a
commit
a3b85430fd
|
@ -88,13 +88,13 @@ public struct Endpoint: RawRepresentable, Codable, Equatable, CustomStringConver
|
|||
}
|
||||
|
||||
public var rawValue: String {
|
||||
return "\(address):\(proto.socketType.rawValue):\(proto.port)"
|
||||
"\(address):\(proto.socketType.rawValue):\(proto.port)"
|
||||
}
|
||||
|
||||
// MARK: CustomStringConvertible
|
||||
|
||||
public var description: String {
|
||||
return "\(address.maskedDescription):\(proto.rawValue)"
|
||||
"\(address.maskedDescription):\(proto.rawValue)"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ public struct EndpointProtocol: RawRepresentable, Equatable, CustomStringConvert
|
|||
/// The remote port.
|
||||
public let port: UInt16
|
||||
|
||||
public init(_ socketType: SocketType, _ port: UInt16) {
|
||||
public init(_ socketType: SocketType, _ port: UInt16) {
|
||||
self.socketType = socketType
|
||||
self.port = port
|
||||
}
|
||||
|
@ -129,13 +129,13 @@ public struct EndpointProtocol: RawRepresentable, Equatable, CustomStringConvert
|
|||
}
|
||||
|
||||
public var rawValue: String {
|
||||
return "\(socketType.rawValue):\(port)"
|
||||
"\(socketType.rawValue):\(port)"
|
||||
}
|
||||
|
||||
// MARK: CustomStringConvertible
|
||||
|
||||
public var description: String {
|
||||
return rawValue
|
||||
rawValue
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public struct IPv4Settings: Codable, Equatable, CustomStringConvertible {
|
|||
// MARK: CustomStringConvertible
|
||||
|
||||
public var description: String {
|
||||
"{\(destination.maskedDescription)/\(mask) \(gateway?.maskedDescription ?? "*")}"
|
||||
"{\(destination)/\(mask) \(gateway?.description ?? "*")}"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,6 @@ public struct IPv4Settings: Codable, Equatable, CustomStringConvertible {
|
|||
// MARK: CustomStringConvertible
|
||||
|
||||
public var description: String {
|
||||
"addr \(address.maskedDescription) netmask \(addressMask) gw \(defaultGateway.maskedDescription)"
|
||||
"addr \(address) netmask \(addressMask) gw \(defaultGateway)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,6 @@ public struct IPv6Settings: Codable, Equatable, CustomStringConvertible {
|
|||
// MARK: CustomStringConvertible
|
||||
|
||||
public var description: String {
|
||||
"addr \(address.maskedDescription)/\(addressPrefixLength) gw \(defaultGateway.maskedDescription)"
|
||||
"addr \(address)/\(addressPrefixLength) gw \(defaultGateway)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ class ResolvedRemote: CustomStringConvertible {
|
|||
// MARK: CustomStringConvertible
|
||||
|
||||
var description: String {
|
||||
return "{\(originalEndpoint.maskedDescription), resolved: \(resolvedEndpoints.maskedDescription)}"
|
||||
"{\(originalEndpoint.maskedDescription), resolved: \(resolvedEndpoints.maskedDescription)}"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue