REALITYConfig.fromJson constructor
REALITYConfig.fromJson(
- Object? json
Implementation
factory REALITYConfig.fromJson(Object? json) {
final map = asJsonMap(json, 'realitySettings');
return REALITYConfig(
masterKeyLog: map['masterKeyLog'] as String?,
show: map['show'] as bool?,
target: map['target'],
dest: map['dest'],
type: map['type'] as String?,
xver: map['xver'] as int?,
serverNames: (map['serverNames'] as List?)?.cast<String>(),
privateKey: map['privateKey'] as String?,
minClientVer: map['minClientVer'] as String?,
maxClientVer: map['maxClientVer'] as String?,
maxTimeDiff: map['maxTimeDiff'] as int?,
shortIds: (map['shortIds'] as List?)?.cast<String>(),
mldsa65Seed: map['mldsa65Seed'] as String?,
limitFallbackUpload: map['limitFallbackUpload'] == null
? null
: LimitFallback.fromJson(map['limitFallbackUpload']),
limitFallbackDownload: map['limitFallbackDownload'] == null
? null
: LimitFallback.fromJson(map['limitFallbackDownload']),
fingerprint: map['fingerprint'] as String?,
serverName: map['serverName'] as String?,
password: map['password'] as String?,
publicKey: map['publicKey'] as String?,
shortId: map['shortId'] as String?,
mldsa65Verify: map['mldsa65Verify'] as String?,
spiderX: map['spiderX'] as String?,
);
}