SsNode.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Model;
  5. /**
  6. * SS节点信息
  7. *
  8. * @property int $id
  9. * @property int $type 服务类型:1-ShadowsocksR、2-V2ray
  10. * @property string $name 名称
  11. * @property string $country_code 国家代码
  12. * @property string|null $server 服务器域名地址
  13. * @property string|null $ip 服务器IPV4地址
  14. * @property string|null $ipv6 服务器IPV6地址
  15. * @property string|null $relay_server 中转地址
  16. * @property int|null $relay_port 中转端口
  17. * @property \App\Models\Level|null $level 等级:0-无等级,全部可见
  18. * @property int $speed_limit 节点限速,为0表示不限速,单位Byte
  19. * @property int $client_limit 设备数限制
  20. * @property string|null $description 节点简单描述
  21. * @property string $method 加密方式
  22. * @property string $protocol 协议
  23. * @property string|null $protocol_param 协议参数
  24. * @property string $obfs 混淆
  25. * @property string|null $obfs_param 混淆参数
  26. * @property float $traffic_rate 流量比率
  27. * @property int $is_subscribe 是否允许用户订阅该节点:0-否、1-是
  28. * @property int $is_ddns 是否使用DDNS:0-否、1-是
  29. * @property int $is_relay 是否中转节点:0-否、1-是
  30. * @property int $is_udp 是否启用UDP:0-不启用、1-启用
  31. * @property int $ssh_port SSH端口
  32. * @property int $detection_type 节点检测: 0-关闭、1-只检测TCP、2-只检测ICMP、3-检测全部
  33. * @property int $compatible 兼容SS
  34. * @property int $single 启用单端口功能:0-否、1-是
  35. * @property int|null $port 单端口的端口号或连接端口号
  36. * @property string|null $passwd 单端口的连接密码
  37. * @property int $sort 排序值,值越大越靠前显示
  38. * @property int $status 状态:0-维护、1-正常
  39. * @property int $v2_alter_id V2Ray额外ID
  40. * @property int $v2_port V2Ray服务端口
  41. * @property string $v2_method V2Ray加密方式
  42. * @property string $v2_net V2Ray传输协议
  43. * @property string $v2_type V2Ray伪装类型
  44. * @property string $v2_host V2Ray伪装的域名
  45. * @property string $v2_path V2Ray的WS/H2路径
  46. * @property int $v2_tls V2Ray后端TLS:0-未开启、1-开启
  47. * @property int $v2_tls_insecure 是否允许不安全连接
  48. * @property int $v2_tls_insecure_ciphers 是否允许不安全的加密方式
  49. * @property \Illuminate\Support\Carbon $created_at
  50. * @property \Illuminate\Support\Carbon $updated_at
  51. * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\SsNodeLabel[] $label
  52. * @property-read int|null $label_count
  53. * @method static Builder|SsNode newModelQuery()
  54. * @method static Builder|SsNode newQuery()
  55. * @method static Builder|SsNode query()
  56. * @method static Builder|SsNode whereClientLimit($value)
  57. * @method static Builder|SsNode whereCompatible($value)
  58. * @method static Builder|SsNode whereCountryCode($value)
  59. * @method static Builder|SsNode whereCreatedAt($value)
  60. * @method static Builder|SsNode whereDescription($value)
  61. * @method static Builder|SsNode whereDetectionType($value)
  62. * @method static Builder|SsNode whereId($value)
  63. * @method static Builder|SsNode whereIp($value)
  64. * @method static Builder|SsNode whereIpv6($value)
  65. * @method static Builder|SsNode whereIsDdns($value)
  66. * @method static Builder|SsNode whereIsRelay($value)
  67. * @method static Builder|SsNode whereIsSubscribe($value)
  68. * @method static Builder|SsNode whereIsUdp($value)
  69. * @method static Builder|SsNode whereLevel($value)
  70. * @method static Builder|SsNode whereMethod($value)
  71. * @method static Builder|SsNode whereName($value)
  72. * @method static Builder|SsNode whereObfs($value)
  73. * @method static Builder|SsNode whereObfsParam($value)
  74. * @method static Builder|SsNode wherePasswd($value)
  75. * @method static Builder|SsNode wherePort($value)
  76. * @method static Builder|SsNode whereProtocol($value)
  77. * @method static Builder|SsNode whereProtocolParam($value)
  78. * @method static Builder|SsNode whereRelayPort($value)
  79. * @method static Builder|SsNode whereRelayServer($value)
  80. * @method static Builder|SsNode whereServer($value)
  81. * @method static Builder|SsNode whereSingle($value)
  82. * @method static Builder|SsNode whereSort($value)
  83. * @method static Builder|SsNode whereSpeedLimit($value)
  84. * @method static Builder|SsNode whereSshPort($value)
  85. * @method static Builder|SsNode whereStatus($value)
  86. * @method static Builder|SsNode whereTrafficRate($value)
  87. * @method static Builder|SsNode whereType($value)
  88. * @method static Builder|SsNode whereUpdatedAt($value)
  89. * @method static Builder|SsNode whereV2AlterId($value)
  90. * @method static Builder|SsNode whereV2Host($value)
  91. * @method static Builder|SsNode whereV2Method($value)
  92. * @method static Builder|SsNode whereV2Net($value)
  93. * @method static Builder|SsNode whereV2Path($value)
  94. * @method static Builder|SsNode whereV2Port($value)
  95. * @method static Builder|SsNode whereV2Tls($value)
  96. * @method static Builder|SsNode whereV2TlsInsecure($value)
  97. * @method static Builder|SsNode whereV2TlsInsecureCiphers($value)
  98. * @method static Builder|SsNode whereV2Type($value)
  99. * @mixin \Eloquent
  100. */
  101. class SsNode extends Model {
  102. protected $table = 'ss_node';
  103. protected $primaryKey = 'id';
  104. function label() {
  105. return $this->hasMany(SsNodeLabel::class, 'node_id', 'id');
  106. }
  107. function getLevel() {
  108. return $this->hasOne(Level::class, 'level', 'level');
  109. }
  110. }