fromInbound static method

V2RayEntity fromInbound(
  1. Inbound inbound,
  2. String email
)

Implementation

static V2RayEntity fromInbound(Inbound inbound, String email) =>
    switch (inbound) {
      VlessInbound v => VlessShareEntity.fromInbound(v, email: email),
      VMessInbound v => VMessShareEntity.fromInbound(v, email: email),
      TrojanInbound v => TrojanShareEntity.fromInbound(v, email: email),
      ShadowSocksInbound v => ShadowSocksShareEntity.fromInbound(
        v,
        email: email,
      ),
      SocksInbound v => SocksShareEntity.fromInbound(v, email: email),

      _ => throw ArgumentError('Unsupported link: ${inbound.protocol}'),
    };