setSocks5Proxy static method

Future<V2TXLiveCode> setSocks5Proxy(
  1. String host,
  2. int port,
  3. String username,
  4. String password,
  5. V2TXLiveSocks5ProxyConfig config
)

设置 SDK socks5 代理配置

参数:

host socks5 代理服务器的地址

port socks5 代理服务器的端口

username socks5 代理服务器的验证的用户名

password socks5 代理服务器的验证的密码

config 详情参考 V2TXLiveSocks5ProxyConfig

Implementation

static Future<V2TXLiveCode> setSocks5Proxy(
    String host, int port, String username, String password, V2TXLiveSocks5ProxyConfig config) async {
  var code = await V2TXLivePremier()._channel.invokeMethod("setSocks5Proxy", {
    "host": host,
    "port": port,
    "username": username,
    "password": password,
    "config": config.toJson()
  });
  if (code is V2TXLiveCode) {
    return code;
  } else {
    return V2TXLIVE_ERROR_FAILED;
  }
}