untrusted
fun untrusted(userAgent: String, policy: OutboundUrlPolicy.Untrusted = OutboundUrlPolicy.untrusted(), resolve: (host: String) -> List<InetAddress> = { InetAddress.getAllByName(it).toList() }): OkHttpTransport(source)
The real transport under an Untrusted policy with every rule live except the loopback ones: the host localhost, the addresses 127.0.0.0/8 and ::1, and the port rule for exactly those hosts are exempt; extraDeniedRanges, the policy's suffixes, the sensitive-header rule and the downgrade rule stay live.
Return
the transport; the caller closes it.
Parameters
userAgent
the User-Agent sent on every hop, as the public factory takes it.
policy
the policy; the defaults when omitted.
resolve
answers a host name with addresses; the system resolver by default. Its exceptions reach the transport unchanged.
Throws
for a userAgent the public factory refuses, or a policy.settings.maxResponseBytes above Int.MAX_VALUE - 8; the message is constant and never echoes a value.