ShadowsocksServerConfig.fromJson constructor

ShadowsocksServerConfig.fromJson(
  1. Object? json
)

Implementation

factory ShadowsocksServerConfig.fromJson(Object? json) {
  final map = asJsonMap(json, 'shadowsocks inbound');
  return ShadowsocksServerConfig(
    cipher: map['method'] as String?,
    password: map['password'] as String?,
    level: map['level'] as int?,
    email: map['email'] as String?,
    users: map['clients'] == null
        ? null
        : asJsonList(map['clients'], ShadowsocksUserConfig.fromJson),
    networkList: map['network'] == null
        ? null
        : XrayNetworkList.fromJson(map['network']),
  );
}