12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import 'package:json_annotation/json_annotation.dart';
- import 'package:speed_safe/app/server/server_base.dart';
- part 'server.g.dart';
- @JsonSerializable(includeIfNull: false)
- class ShadowsocksServer extends ServerBase {
- String password;
- String encryption;
- String? plugin;
- String? pluginOpts;
- ShadowsocksServer({
- required String protocol,
- required String address,
- required int port,
- required String remark,
- required this.password,
- required this.encryption,
- this.plugin,
- this.pluginOpts,
- }) : super(
- protocol: protocol,
- address: address,
- port: port,
- remark: remark,
- );
- factory ShadowsocksServer.defaults() => ShadowsocksServer(
- protocol: 'shadowsocks',
- address: '',
- port: 0,
- remark: '',
- password: '',
- encryption: 'aes-128-gcm',
- );
- factory ShadowsocksServer.fromJson(Map<String, dynamic> json) =>
- _$ShadowsocksServerFromJson(json);
- @override
- Map<String, dynamic> toJson() => _$ShadowsocksServerToJson(this);
- }
|