ShadowsocksClientConfig.fromJson constructor
ShadowsocksClientConfig.fromJson(
- Object? json
Implementation
factory ShadowsocksClientConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'shadowsocks outbound');
return ShadowsocksClientConfig(
address: map['address'] == null
? null
: XrayAddress.fromJson(map['address']),
port: map['port'] as int?,
level: map['level'] as int?,
email: map['email'] as String?,
cipher: map['method'] as String?,
password: map['password'] as String?,
uot: map['uot'] as bool?,
uotVersion: map['uotVersion'] as int?,
servers: map['servers'] == null
? null
: asJsonList(map['servers'], ShadowsocksServerTarget.fromJson),
);
}