类 ProxyConfig.Builder
java.lang.Object
io.agentscope.core.model.transport.ProxyConfig.Builder
- 封闭类:
ProxyConfig
Builder for ProxyConfig.
-
方法概要
修饰符和类型方法说明build()Build the ProxyConfig.Set the proxy server hostname or IP address.nonProxyHosts(Set<String> nonProxyHosts) Set the hosts that should bypass the proxy.Set the authentication password.port(int port) Set the proxy server port.Set the proxy type.Set the authentication username.
-
方法详细资料
-
type
Set the proxy type.- 参数:
type- the proxy type- 返回:
- this builder
-
host
Set the proxy server hostname or IP address.- 参数:
host- the proxy host- 返回:
- this builder
-
port
Set the proxy server port.- 参数:
port- the proxy port- 返回:
- this builder
-
username
Set the authentication username.- 参数:
username- the username- 返回:
- this builder
-
password
Set the authentication password.- 参数:
password- the password- 返回:
- this builder
-
nonProxyHosts
Set the hosts that should bypass the proxy.Supports exact hostnames and wildcard patterns:
localhost- exact match*.internal.com- suffix match192.168.*- prefix match
- 参数:
nonProxyHosts- the set of non-proxy hosts- 返回:
- this builder
-
build
Build the ProxyConfig.- 返回:
- a new ProxyConfig instance
- 抛出:
NullPointerException- if type or host is nullIllegalArgumentException- if port is out of range
-