bingo 6 лет назад
Родитель
Сommit
dbde0a2f79

+ 1 - 1
app/Console/Commands/AutoCheckNodeTCP.php

@@ -49,7 +49,7 @@ class AutoCheckNodeTCP extends Command
     {
         $title = "节点异常警告";
 
-        $nodeList = SsNode::query()->where('status', 1)->where('is_tcp_check', 1)->where('is_nat', 0)->get();
+        $nodeList = SsNode::query()->where('is_transit', 0)->where('is_nat', 0)->where('status', 1)->where('is_tcp_check', 1)->get();
         foreach ($nodeList as $node) {
             $tcpCheck = $this->tcpCheck($node->ip);
             if (false !== $tcpCheck) {

+ 4 - 4
app/Http/Controllers/AdminController.php

@@ -616,7 +616,7 @@ class AdminController extends Controller
                 $ssNode->monitor_url = $request->get('monitor_url') ? $request->get('monitor_url') : '';
                 $ssNode->is_subscribe = intval($request->get('is_subscribe'));
                 $ssNode->is_nat = intval($request->get('is_nat'));
-                $ssNode->is_udp = intval($request->get('is_udp'));
+                $ssNode->is_transit = intval($request->get('is_transit'));
                 $ssNode->ssh_port = $request->get('ssh_port') ? intval($request->get('ssh_port')) : 22;
                 $ssNode->is_tcp_check = intval($request->get('is_tcp_check'));
                 $ssNode->compatible = intval($request->get('type')) == 2 ? 0 : (intval($request->get('is_nat')) ? 0 : intval($request->get('compatible')));
@@ -736,7 +736,7 @@ class AdminController extends Controller
                     'monitor_url'      => $request->get('monitor_url') ? $request->get('monitor_url') : '',
                     'is_subscribe'     => intval($request->get('is_subscribe')),
                     'is_nat'           => intval($request->get('is_nat')),
-                    'is_udp'           => intval($request->get('is_udp')),
+                    'is_transit'       => intval($request->get('is_transit')),
                     'ssh_port'         => intval($request->get('ssh_port')),
                     'is_tcp_check'     => intval($request->get('is_tcp_check')),
                     'compatible'       => intval($request->get('type')) == 2 ? 0 : (intval($request->get('is_nat')) ? 0 : intval($request->get('compatible'))),
@@ -1435,7 +1435,7 @@ class AdminController extends Controller
                     "path" => $node->v2_path,
                     "tls"  => $node->v2_tls ? "tls" : ""
                 ];
-                $v2_scheme = 'vmess://' . base64url_encode(json_encode($v2_json,JSON_PRETTY_PRINT));
+                $v2_scheme = 'vmess://' . base64url_encode(json_encode($v2_json, JSON_PRETTY_PRINT));
 
                 // 生成文本配置信息
                 $txt = "服务器:" . ($node->server ? $node->server : $node->ip) . "\r\n";
@@ -1521,7 +1521,7 @@ EOF;
                 return Redirect::back();
             }
 
-             $ret = User::uid()->update(['password' => Hash::make($new_password)]);
+            $ret = User::uid()->update(['password' => Hash::make($new_password)]);
             if (!$ret) {
                 Session::flash('errorMsg', '修改失败');
 

+ 57 - 58
resources/views/admin/addNode.blade.php

@@ -13,9 +13,11 @@
                     <div class="col-md-12">
                         <div class="note note-info">
                             <p><strong>注意:</strong> 添加节点后自动生成的<code>ID</code>,即为该节点部署ShadowsocksR Python版后端时<code>usermysql.json</code>中的<code>node_id</code>的值,同时也是部署V2Ray后端时的<code>nodeId</code>的值;</p>
-                            <p>V2Ray Go版节点部署 <a href="https://github.com/ssrpanel/SSRPanel/wiki/V2Ray%E5%AE%8C%E6%95%B4%E9%85%8D%E7%BD%AE%E7%A4%BA%E4%BE%8B%EF%BC%88Go%E7%89%88%EF%BC%89" target="_blank" style="color:red;">[教程]</a>;</p>
-                            <p>Shadowsocks Go版节点部署 <a href="https://github.com/ssrpanel/SSRPanel/wiki/SS-Go%E7%89%88%E8%8A%82%E7%82%B9%E9%83%A8%E7%BD%B2" target="_blank" style="color:red;">[教程]</a>;</p>
-                            <p>更改服务器的SSH端口 <a href="https://github.com/ssrpanel/SSRPanel/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%A6%81%E6%AD%A2PING%E3%80%81%E6%94%B9SSH%E7%AB%AF%E5%8F%A3%E5%8F%B7" target="_blank" style="color:red;">[教程]</a>;</p>
+                            <p>V2Ray Go版节点<a href="https://github.com/ssrpanel/SSRPanel/wiki/V2Ray%E5%AE%8C%E6%95%B4%E9%85%8D%E7%BD%AE%E7%A4%BA%E4%BE%8B%EF%BC%88Go%E7%89%88%EF%BC%89" target="_blank">部署教程</a>;
+                                Shadowsocks Go版节点<a href="https://github.com/ssrpanel/SSRPanel/wiki/SS-Go%E7%89%88%E8%8A%82%E7%82%B9%E9%83%A8%E7%BD%B2" target="_blank">部署教程</a>;
+                                更改服务器的SSH端口<a href="https://github.com/ssrpanel/SSRPanel/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%A6%81%E6%AD%A2PING%E3%80%81%E6%94%B9SSH%E7%AB%AF%E5%8F%A3%E5%8F%B7" target="_blank">教程</a>;</p>
+                            <p>中转节点需要自行配置服务器端口转发,TCP阻断检测无效,务必填写域名; </p>
+                            <p>NAT节点需要<a href="https://github.com/ssrpanel/SSRPanel/wiki/NAT-VPS%E9%85%8D%E7%BD%AE%E6%95%99%E7%A8%8B" target="_blank">配置DDNS</a>,TCP阻断检测无效,务必填写域名; </p>
                         </div>
                     </div>
                 </div>
@@ -33,6 +35,21 @@
                                                 </div>
                                             </div>
                                             <div class="portlet-body">
+                                                <div class="form-group">
+                                                    <label for="is_transit" class="col-md-3 control-label">中转</label>
+                                                    <div class="col-md-8">
+                                                        <div class="mt-radio-inline">
+                                                            <label class="mt-radio">
+                                                                <input type="radio" name="is_transit" value="1"> 是
+                                                                <span></span>
+                                                            </label>
+                                                            <label class="mt-radio">
+                                                                <input type="radio" name="is_transit" value="0" checked> 否
+                                                                <span></span>
+                                                            </label>
+                                                        </div>
+                                                    </div>
+                                                </div>
                                                 <div class="form-group">
                                                     <label for="is_nat" class="col-md-3 control-label">NAT</label>
                                                     <div class="col-md-8">
@@ -46,7 +63,6 @@
                                                                 <span></span>
                                                             </label>
                                                         </div>
-                                                        <span class="help-block"> NAT机需要<a href="https://github.com/ssrpanel/SSRPanel/wiki/NAT-VPS%E9%85%8D%E7%BD%AE%E6%95%99%E7%A8%8B" target="_blank">配置DDNS</a>,TCP阻断检测无效,务必填写域名 </span>
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
@@ -62,15 +78,15 @@
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
-                                                    <label for="ip" class="col-md-3 control-label"> IPV4地址 </label>
+                                                    <label for="ip" class="col-md-3 control-label"> IPv4地址 </label>
                                                     <div class="col-md-8">
-                                                        <input type="text" class="form-control" name="ip" id="ip" placeholder="服务器IPV4地址" required>
+                                                        <input type="text" class="form-control" name="ip" id="ip" placeholder="服务器IPv4地址" required>
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
-                                                    <label for="ipv6" class="col-md-3 control-label"> IPV6地址 </label>
+                                                    <label for="ipv6" class="col-md-3 control-label"> IPv6地址 </label>
                                                     <div class="col-md-8">
-                                                        <input type="text" class="form-control" name="ipv6" id="ipv6" placeholder="服务器IPV6地址,填写则用户可见,域名无效">
+                                                        <input type="text" class="form-control" name="ipv6" id="ipv6" placeholder="服务器IPv6地址,填写则用户可见,域名无效">
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
@@ -108,7 +124,6 @@
                                                                 @endforeach
                                                             @endif
                                                         </select>
-                                                        <span class="help-block">订阅时分组展示</span>
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
@@ -152,53 +167,6 @@
                                                         </div>
                                                     </div>
                                                 </div>
-                                                <div class="form-group">
-                                                    <label for="is_subscribe" class="col-md-3 control-label">订阅</label>
-                                                    <div class="col-md-8">
-                                                        <div class="mt-radio-inline">
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_subscribe" value="1" checked> 允许
-                                                                <span></span>
-                                                            </label>
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_subscribe" value="0"> 不允许
-                                                                <span></span>
-                                                            </label>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <div class="form-group">
-                                                    <label for="is_udp" class="col-md-3 control-label">UDP</label>
-                                                    <div class="col-md-8">
-                                                        <div class="mt-radio-inline">
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_udp" value="1" checked> 允许
-                                                                <span></span>
-                                                            </label>
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_udp" value="0"> 不允许
-                                                                <span></span>
-                                                            </label>
-                                                        </div>
-                                                        <span class="help-block"> 禁止UDP,则无法用于加速游戏 </span>
-                                                    </div>
-                                                </div>
-                                                <div class="form-group">
-                                                    <label for="is_tcp_check" class="col-md-3 control-label">TCP阻断检测</label>
-                                                    <div class="col-md-8">
-                                                        <div class="mt-radio-inline">
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_tcp_check" value="1" checked> 开启
-                                                                <span></span>
-                                                            </label>
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_tcp_check" value="0"> 关闭
-                                                                <span></span>
-                                                            </label>
-                                                        </div>
-                                                        <span class="help-block"> 每30~60分钟随机进行TCP阻断检测 </span>
-                                                    </div>
-                                                </div>
                                                 <!--
                                                 <div class="form-group">
                                                     <label for="bandwidth" class="col-md-3 control-label">出口带宽</label>
@@ -313,6 +281,37 @@
                                                             <span class="help-block"> 如果兼容请在服务端配置协议和混淆时加上<span style="color:red">_compatible</span> </span>
                                                         </div>
                                                     </div>
+                                                    <div class="form-group">
+                                                        <label for="is_subscribe" class="col-md-3 control-label">订阅</label>
+                                                        <div class="col-md-8">
+                                                            <div class="mt-radio-inline">
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_subscribe" value="1" checked> 允许
+                                                                    <span></span>
+                                                                </label>
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_subscribe" value="0"> 不允许
+                                                                    <span></span>
+                                                                </label>
+                                                            </div>
+                                                        </div>
+                                                    </div>
+                                                    <div class="form-group">
+                                                        <label for="is_tcp_check" class="col-md-3 control-label">TCP阻断检测</label>
+                                                        <div class="col-md-8">
+                                                            <div class="mt-radio-inline">
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_tcp_check" value="1" checked> 开启
+                                                                    <span></span>
+                                                                </label>
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_tcp_check" value="0"> 关闭
+                                                                    <span></span>
+                                                                </label>
+                                                            </div>
+                                                            <span class="help-block"> 每30~60分钟随机进行TCP阻断检测 </span>
+                                                        </div>
+                                                    </div>
                                                     <hr />
                                                     <div class="form-group">
                                                         <label for="single" class="col-md-3 control-label">单端口</label>
@@ -538,7 +537,7 @@
             var monitor_url = $('#monitor_url').val();
             var is_subscribe = $("input:radio[name='is_subscribe']:checked").val();
             var is_nat = $("input:radio[name='is_nat']:checked").val();
-            var is_udp = $("input:radio[name='is_udp']:checked").val();
+            var is_transit = $("input:radio[name='is_transit']:checked").val();
             var ssh_port = $('#ssh_port').val();
             var compatible = $("input:radio[name='compatible']:checked").val();
             var single = $("input:radio[name='single']:checked").val();
@@ -589,7 +588,7 @@
                     monitor_url: monitor_url,
                     is_subscribe: is_subscribe,
                     is_nat: is_nat,
-                    is_udp: is_udp,
+                    is_transit: is_transit,
                     ssh_port: ssh_port,
                     compatible: compatible,
                     single: single,

+ 57 - 58
resources/views/admin/editNode.blade.php

@@ -13,9 +13,11 @@
                     <div class="col-md-12">
                         <div class="note note-info">
                             <p><strong>注意:</strong> 添加节点后自动生成的<code>ID</code>,即为该节点部署ShadowsocksR Python版后端时<code>usermysql.json</code>中的<code>node_id</code>的值,同时也是部署V2Ray后端时的<code>nodeId</code>的值;</p>
-                            <p>V2Ray Go版节点部署 <a href="https://github.com/ssrpanel/SSRPanel/wiki/V2Ray%E5%AE%8C%E6%95%B4%E9%85%8D%E7%BD%AE%E7%A4%BA%E4%BE%8B%EF%BC%88Go%E7%89%88%EF%BC%89" target="_blank" style="color:red;">[教程]</a>;</p>
-                            <p>Shadowsocks Go版节点部署 <a href="https://github.com/ssrpanel/SSRPanel/wiki/SS-Go%E7%89%88%E8%8A%82%E7%82%B9%E9%83%A8%E7%BD%B2" target="_blank" style="color:red;">[教程]</a>;</p>
-                            <p>更改服务器的SSH端口 <a href="https://github.com/ssrpanel/SSRPanel/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%A6%81%E6%AD%A2PING%E3%80%81%E6%94%B9SSH%E7%AB%AF%E5%8F%A3%E5%8F%B7" target="_blank" style="color:red;">[教程]</a>;</p>
+                            <p>V2Ray Go版节点<a href="https://github.com/ssrpanel/SSRPanel/wiki/V2Ray%E5%AE%8C%E6%95%B4%E9%85%8D%E7%BD%AE%E7%A4%BA%E4%BE%8B%EF%BC%88Go%E7%89%88%EF%BC%89" target="_blank">部署教程</a>;
+                            Shadowsocks Go版节点<a href="https://github.com/ssrpanel/SSRPanel/wiki/SS-Go%E7%89%88%E8%8A%82%E7%82%B9%E9%83%A8%E7%BD%B2" target="_blank">部署教程</a>;
+                            更改服务器的SSH端口<a href="https://github.com/ssrpanel/SSRPanel/wiki/%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%A6%81%E6%AD%A2PING%E3%80%81%E6%94%B9SSH%E7%AB%AF%E5%8F%A3%E5%8F%B7" target="_blank">教程</a>;</p>
+                            <p>中转节点需要自行配置服务器端口转发,TCP阻断检测无效,务必填写域名; </p>
+                            <p>NAT节点需要<a href="https://github.com/ssrpanel/SSRPanel/wiki/NAT-VPS%E9%85%8D%E7%BD%AE%E6%95%99%E7%A8%8B" target="_blank">配置DDNS</a>,TCP阻断检测无效,务必填写域名; </p>
                         </div>
                     </div>
                 </div>
@@ -33,6 +35,21 @@
                                                 </div>
                                             </div>
                                             <div class="portlet-body">
+                                                <div class="form-group">
+                                                    <label for="is_transit" class="col-md-3 control-label">中转</label>
+                                                    <div class="col-md-8">
+                                                        <div class="mt-radio-inline">
+                                                            <label class="mt-radio">
+                                                                <input type="radio" name="is_transit" value="1" {{$node->is_transit == '1' ? 'checked' : ''}}> 是
+                                                                <span></span>
+                                                            </label>
+                                                            <label class="mt-radio">
+                                                                <input type="radio" name="is_transit" value="0" {{$node->is_transit == '0' ? 'checked' : ''}}> 否
+                                                                <span></span>
+                                                            </label>
+                                                        </div>
+                                                    </div>
+                                                </div>
                                                 <div class="form-group">
                                                     <label for="is_nat" class="col-md-3 control-label">NAT</label>
                                                     <div class="col-md-8">
@@ -46,7 +63,6 @@
                                                                 <span></span>
                                                             </label>
                                                         </div>
-                                                        <span class="help-block"> NAT机需要<a href="https://github.com/ssrpanel/SSRPanel/wiki/NAT-VPS%E9%85%8D%E7%BD%AE%E6%95%99%E7%A8%8B" target="_blank">配置DDNS</a>,TCP阻断检测无效,务必填写域名 </span>
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
@@ -65,15 +81,15 @@
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
-                                                    <label for="ip" class="col-md-3 control-label"> IPV4地址 </label>
+                                                    <label for="ip" class="col-md-3 control-label"> IPv4地址 </label>
                                                     <div class="col-md-8">
-                                                        <input type="text" class="form-control" name="ip" value="{{$node->ip}}" id="ip" placeholder="服务器IPV4地址" {{$node->is_nat ? 'readonly=readonly' : ''}} required>
+                                                        <input type="text" class="form-control" name="ip" value="{{$node->ip}}" id="ip" placeholder="服务器IPv4地址" {{$node->is_nat ? 'readonly=readonly' : ''}} required>
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
-                                                    <label for="ipv6" class="col-md-3 control-label"> IPV6地址 </label>
+                                                    <label for="ipv6" class="col-md-3 control-label"> IPv6地址 </label>
                                                     <div class="col-md-8">
-                                                        <input type="text" class="form-control" name="ipv6" value="{{$node->ipv6}}" id="ipv6" placeholder="服务器IPV6地址,填写则用户可见,域名无效">
+                                                        <input type="text" class="form-control" name="ipv6" value="{{$node->ipv6}}" id="ipv6" placeholder="服务器IPv6地址,填写则用户可见,域名无效">
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
@@ -111,7 +127,6 @@
                                                                 @endforeach
                                                             @endif
                                                         </select>
-                                                        <span class="help-block">订阅时分组展示</span>
                                                     </div>
                                                 </div>
                                                 <div class="form-group">
@@ -155,53 +170,6 @@
                                                         </div>
                                                     </div>
                                                 </div>
-                                                <div class="form-group">
-                                                    <label for="is_subscribe" class="col-md-3 control-label">订阅</label>
-                                                    <div class="col-md-8">
-                                                        <div class="mt-radio-inline">
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_subscribe" value="1" {{$node->is_subscribe ? 'checked' : ''}}> 允许
-                                                                <span></span>
-                                                            </label>
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_subscribe" value="0" {{!$node->is_subscribe ? 'checked' : ''}}> 不允许
-                                                                <span></span>
-                                                            </label>
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                                <div class="form-group">
-                                                    <label for="is_udp" class="col-md-3 control-label">UDP</label>
-                                                    <div class="col-md-8">
-                                                        <div class="mt-radio-inline">
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_udp" value="1" {{$node->is_udp ? 'checked' : ''}}> 允许
-                                                                <span></span>
-                                                            </label>
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_udp" value="0" {{!$node->is_udp ? 'checked' : ''}}> 不允许
-                                                                <span></span>
-                                                            </label>
-                                                        </div>
-                                                        <span class="help-block"> 禁止UDP,则无法用于加速游戏 </span>
-                                                    </div>
-                                                </div>
-                                                <div class="form-group">
-                                                    <label for="is_tcp_check" class="col-md-3 control-label">TCP阻断检测</label>
-                                                    <div class="col-md-8">
-                                                        <div class="mt-radio-inline">
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_tcp_check" value="1" {{$node->is_tcp_check == '1' ? 'checked' : ''}}> 开启
-                                                                <span></span>
-                                                            </label>
-                                                            <label class="mt-radio">
-                                                                <input type="radio" name="is_tcp_check" value="0" {{$node->is_tcp_check == '0' ? 'checked' : ''}}> 关闭
-                                                                <span></span>
-                                                            </label>
-                                                        </div>
-                                                        <span class="help-block"> 每30~60分钟随机进行TCP阻断检测 </span>
-                                                    </div>
-                                                </div>
                                                 <!--
                                                 <div class="form-group">
                                                     <label for="bandwidth" class="col-md-3 control-label">出口带宽</label>
@@ -316,6 +284,37 @@
                                                             <span class="help-block"> 如果兼容请在服务端配置协议和混淆时加上<span style="color:red">_compatible</span> </span>
                                                         </div>
                                                     </div>
+                                                    <div class="form-group">
+                                                        <label for="is_subscribe" class="col-md-3 control-label">订阅</label>
+                                                        <div class="col-md-8">
+                                                            <div class="mt-radio-inline">
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_subscribe" value="1" {{$node->is_subscribe ? 'checked' : ''}}> 允许
+                                                                    <span></span>
+                                                                </label>
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_subscribe" value="0" {{!$node->is_subscribe ? 'checked' : ''}}> 不允许
+                                                                    <span></span>
+                                                                </label>
+                                                            </div>
+                                                        </div>
+                                                    </div>
+                                                    <div class="form-group">
+                                                        <label for="is_tcp_check" class="col-md-3 control-label">TCP阻断检测</label>
+                                                        <div class="col-md-8">
+                                                            <div class="mt-radio-inline">
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_tcp_check" value="1" {{$node->is_tcp_check == '1' ? 'checked' : ''}}> 开启
+                                                                    <span></span>
+                                                                </label>
+                                                                <label class="mt-radio">
+                                                                    <input type="radio" name="is_tcp_check" value="0" {{$node->is_tcp_check == '0' ? 'checked' : ''}}> 关闭
+                                                                    <span></span>
+                                                                </label>
+                                                            </div>
+                                                            <span class="help-block"> 每30~60分钟随机进行TCP阻断检测 </span>
+                                                        </div>
+                                                    </div>
                                                     <hr />
                                                     <div class="form-group">
                                                         <label for="single" class="col-md-3 control-label">单端口</label>
@@ -543,7 +542,7 @@
             var monitor_url = $('#monitor_url').val();
             var is_subscribe = $("input:radio[name='is_subscribe']:checked").val();
             var is_nat = $("input:radio[name='is_nat']:checked").val();
-            var is_udp = $("input:radio[name='is_udp']:checked").val();
+            var is_transit = $("input:radio[name='is_transit']:checked").val();
             var ssh_port = $('#ssh_port').val();
             var compatible = $("input:radio[name='compatible']:checked").val();
             var single = $("input:radio[name='single']:checked").val();
@@ -595,7 +594,7 @@
                     monitor_url: monitor_url,
                     is_subscribe: is_subscribe,
                     is_nat: is_nat,
-                    is_udp: is_udp,
+                    is_transit: is_transit,
                     ssh_port: ssh_port,
                     compatible: compatible,
                     single: single,

+ 5 - 1
resources/views/admin/nodeList.blade.php

@@ -59,7 +59,11 @@
                                             <tr class="odd gradeX">
                                                 <td> {{$node->id}} </td>
                                                 <td>
-                                                    <span class="label {{$node->status ? 'label-info' : 'label-default'}}">{{$node->type == 2 ? 'V2Ray' : 'Shadowsocks(R)'}}</span>
+                                                    @if($node->is_transit)
+                                                        <span class="label {{$node->status ? 'label-info' : 'label-default'}}">{{$node->is_transit ? '中转' : ''}}</span>
+                                                    @else
+                                                        <span class="label {{$node->status ? 'label-info' : 'label-default'}}">{{$node->type == 2 ? 'V2Ray' : 'Shadowsocks(R)'}}</span>
+                                                    @endif
                                                 </td>
                                                 <td> {{$node->name}} </td>
                                                 <td>

+ 1 - 1
sql/db.sql

@@ -44,7 +44,7 @@ CREATE TABLE `ss_node` (
   `monitor_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '监控地址',
   `is_subscribe` TINYINT(4) NULL DEFAULT '1' COMMENT '是否允许用户订阅该节点:0-否、1-是',
   `is_nat` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否为NAT机:0-否、1-是',
-  `is_udp` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '是否允许UDP:0-否、1-是',
+  `is_transit` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否中转节点:0-否、1-是',
   `ssh_port` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '22' COMMENT 'SSH端口',
   `is_tcp_check` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '是否开启检测: 0-不开启、1-开启',
   `compatible` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '兼容SS',

+ 6 - 0
sql/update/20190408.sql

@@ -0,0 +1,6 @@
+-- 加入中转节点,废弃无用的is_udp字段
+ALTER TABLE `ss_node`
+  DROP COLUMN `is_udp`;
+
+ALTER TABLE `ss_node`
+  ADD COLUMN `is_transit` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否中转节点:0-否、1-是' AFTER `is_udp`;