Skip to content

Commit

Permalink
(端口偏移):去除冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekQu committed Mar 10, 2020
1 parent 0fd0b03 commit 2ea7dde
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion resources/views/material/admin/node/create.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
<label class="floating-label" for="info">节点描述</label>
<input class="form-control maxwidth-edit" id="info" type="text" name="info"
value="无描述">
<p class="form-control-guide"><i class="material-icons">info</i>设置单端口偏移请在描述最后加"#偏移值",正加负减</p>
</div>

<div class="form-group form-group-label">
Expand Down
1 change: 0 additions & 1 deletion resources/views/material/admin/node/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
<label class="floating-label" for="info">节点描述</label>
<input class="form-control maxwidth-edit" id="info" name="info" type="text"
value="{$node->info}">
<p class="form-control-guide"><i class="material-icons">info</i>设置单端口偏移请在描述最后加"#偏移值",正加负减</p>
</div>

<div class="form-group form-group-label">
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,15 @@ public function node($request, $response, $args)

$array_node['id'] = $node->id;
$array_node['class'] = $node->node_class;
$array_node['name'] = explode("#",$node->name)[0];
$array_node['name'] = $node->name;
if ($node->sort == 13) {
$server = Tools::ssv2Array($node->server);
$array_node['server'] = $server['add'];
} else {
$array_node['server'] = $node->getServer();
}
$array_node['sort'] = $node->sort;
$array_node['info'] = explode("#", $node->info)[0];
$array_node['info'] = $node->info;
$array_node['mu_only'] = $node->mu_only;
$array_node['group'] = $node->node_group;

Expand Down
9 changes: 0 additions & 9 deletions src/Utils/URL.php
Original file line number Diff line number Diff line change
Expand Up @@ -940,15 +940,6 @@ static function ($query) use ($user) {
}
)->orderBy('priority', 'DESC')->orderBy('id')->first();
$node_name = $node->name;
/***节点描述后加#偏移值***/
$temp = explode("#", $node->info);
$offset = 0;
if ($temp[1]!=null){
if (is_numeric($temp[1])) {
$offset = $temp[1];
}
}
/************/
if ($relay_rule != null) {
$node_name .= ' - ' . $relay_rule->dist_node()->name;
}
Expand Down

0 comments on commit 2ea7dde

Please sign in to comment.