类 ProxyConfig.Builder

java.lang.Object
io.agentscope.core.model.transport.ProxyConfig.Builder
封闭类:
ProxyConfig

public static class ProxyConfig.Builder extends Object
Builder for ProxyConfig.
  • 方法详细资料

    • type

      public ProxyConfig.Builder type(ProxyType type)
      Set the proxy type.
      参数:
      type - the proxy type
      返回:
      this builder
    • host

      public ProxyConfig.Builder host(String host)
      Set the proxy server hostname or IP address.
      参数:
      host - the proxy host
      返回:
      this builder
    • port

      public ProxyConfig.Builder port(int port)
      Set the proxy server port.
      参数:
      port - the proxy port
      返回:
      this builder
    • username

      public ProxyConfig.Builder username(String username)
      Set the authentication username.
      参数:
      username - the username
      返回:
      this builder
    • password

      public ProxyConfig.Builder password(String password)
      Set the authentication password.
      参数:
      password - the password
      返回:
      this builder
    • nonProxyHosts

      public ProxyConfig.Builder nonProxyHosts(Set<String> nonProxyHosts)
      Set the hosts that should bypass the proxy.

      Supports exact hostnames and wildcard patterns:

      • localhost - exact match
      • *.internal.com - suffix match
      • 192.168.* - prefix match
      参数:
      nonProxyHosts - the set of non-proxy hosts
      返回:
      this builder
    • build

      public ProxyConfig build()
      Build the ProxyConfig.
      返回:
      a new ProxyConfig instance
      抛出:
      NullPointerException - if type or host is null
      IllegalArgumentException - if port is out of range