SsNode.php 6.2 KB

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