Files
panel-vpn/web/templates/inbound_edit.html
T

179 lines
7.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}} · VPN Panel</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/css/app.css">
</head>
<body class="page-admin">
<aside class="sidebar">
<a class="brand" href="/admin">VPN Panel</a>
<nav>
<a href="/admin">Обзор</a>
<a href="/admin/clients">Пользователи</a>
<a href="/admin/nodes">Ноды</a>
<a class="active" href="/admin/profiles">Профили</a>
<a href="/admin/protocols">Протоколы</a>
</nav>
<div class="sidebar-foot">
<span class="user-chip">{{.UserName}}</span>
<form method="POST" action="/logout"><button type="submit" class="link-btn">Выйти</button></form>
</div>
</aside>
<main class="admin-main">
<header class="admin-header row-head">
<div>
<h1>Inbound <code>{{.Inbound.Tag}}</code></h1>
<p class="muted">Xray-core · профиль {{.Profile.Name}}</p>
</div>
<a class="btn btn-ghost" href="/admin/profiles/{{.Profile.ID}}">К профилю</a>
</header>
{{if .Flash}}<div class="alert ok">{{.Flash}}</div>{{end}}
{{if .Error}}<div class="alert">{{.Error}}</div>{{end}}
<section class="panel-section">
<form class="form-card" method="POST" action="/admin/profiles/{{.Profile.ID}}/inbounds/{{.Inbound.ID}}">
<div class="form-grid">
<label>Протокол
<select name="protocol_id" required>
{{range .Protocols}}
<option value="{{.ID}}" {{if eq .ID $.Inbound.ProtocolID}}selected{{end}}>{{.Name}} ({{.Code}})</option>
{{end}}
</select>
</label>
<label>Tag
<input name="tag" required value="{{.Inbound.Tag}}">
</label>
<label>Порт
<input name="port" type="number" value="{{.Inbound.Port}}">
</label>
<label>Listen
<input name="listen" value="{{.Inbound.Listen}}">
</label>
<label>Network
<select name="network">
{{$n := .Inbound.Network}}
<option value="tcp" {{if eq $n "tcp"}}selected{{end}}>tcp</option>
<option value="ws" {{if eq $n "ws"}}selected{{end}}>ws</option>
<option value="grpc" {{if eq $n "grpc"}}selected{{end}}>grpc</option>
<option value="httpupgrade" {{if eq $n "httpupgrade"}}selected{{end}}>httpupgrade</option>
<option value="xhttp" {{if eq $n "xhttp"}}selected{{end}}>xhttp</option>
<option value="kcp" {{if eq $n "kcp"}}selected{{end}}>kcp</option>
</select>
</label>
<label>Security
<select name="security">
<option value="none" {{if eq .Inbound.Security "none"}}selected{{end}}>none</option>
<option value="tls" {{if eq .Inbound.Security "tls"}}selected{{end}}>tls</option>
<option value="reality" {{if eq .Inbound.Security "reality"}}selected{{end}}>reality</option>
</select>
</label>
<label>Path / serviceName
<input name="path" value="{{.Inbound.Path}}">
</label>
<label>Host header
<input name="host" value="{{.Inbound.Host}}">
</label>
<label>SNI
<input name="sni" value="{{.Inbound.SNI}}">
</label>
<label>Fingerprint
<input name="fingerprint" value="{{.Inbound.Fingerprint}}">
</label>
<label>Flow
<input name="flow" value="{{.Inbound.Flow}}">
</label>
<label>ALPN
<input name="alpn" value="{{.Inbound.ALPN}}">
</label>
<label>Порядок
<input name="sort_order" type="number" value="{{.Inbound.SortOrder}}">
</label>
<label>Заметка
<input name="remark" value="{{.Inbound.Remark}}">
</label>
<label>SS method
<input name="ss_method" value="{{.Inbound.SSMethod}}">
</label>
<label>Password (shared, optional)
<input name="password" value="{{.Inbound.Password}}">
</label>
<label>Fallback dest
<input name="fallback_dest" value="{{.Inbound.FallbackDest}}" placeholder="127.0.0.1:80">
</label>
</div>
<h3 class="section-sub">Reality (XTLS)</h3>
<div class="form-grid">
<label>Dest
<input name="reality_dest" value="{{.Inbound.RealityDest}}" placeholder="www.microsoft.com:443">
</label>
<label>Server names
<input name="reality_server_names" value="{{.Inbound.RealityServerNames}}">
</label>
<label>SpiderX
<input name="spider_x" value="{{.Inbound.SpiderX}}">
</label>
<label>xver
<input name="reality_xver" type="number" value="{{.Inbound.RealityXver}}">
</label>
<label>Short ID
<input name="reality_short_id" value="{{.Inbound.RealityShortID}}" class="mono">
</label>
<label>Short IDs (через запятую)
<input name="reality_short_ids" value="{{.Inbound.RealityShortIDs}}" class="mono">
</label>
<label>Private key
<input name="reality_private_key" value="{{.Inbound.RealityPrivateKey}}" class="mono">
</label>
<label>Public key
<input name="reality_public_key" value="{{.Inbound.RealityPublicKey}}" class="mono">
</label>
</div>
<h3 class="section-sub">TLS certificates (PEM)</h3>
<p class="muted">Нужны только при security=tls. На ноде пишутся в /usr/local/etc/xray/certs/</p>
<div class="form-grid">
<label>Certificate PEM
<textarea name="tls_cert_pem" rows="4" class="mono">{{.Inbound.TLSCertPEM}}</textarea>
</label>
<label>Private key PEM
<textarea name="tls_key_pem" rows="4" class="mono">{{.Inbound.TLSKeyPEM}}</textarea>
</label>
<label>Fallbacks JSON
<textarea name="fallbacks_json" rows="3" class="mono" placeholder='[{"dest":"127.0.0.1:80"}]'>{{.Inbound.FallbacksJSON}}</textarea>
</label>
</div>
<label class="check-row">
<input type="hidden" name="sniffing" value="off">
<input type="checkbox" name="sniffing" value="on" {{if .Inbound.Sniffing}}checked{{end}}>
Sniffing
</label>
<label class="check-row">
<input type="hidden" name="sniffing_route_only" value="off">
<input type="checkbox" name="sniffing_route_only" value="on" {{if .Inbound.SniffingRouteOnly}}checked{{end}}>
Sniffing routeOnly
</label>
<label class="check-row">
<input type="hidden" name="enabled" value="off">
<input type="checkbox" name="enabled" value="on" {{if .Inbound.Enabled}}checked{{end}}>
Включён в профиле
</label>
<div class="cta-row">
<button class="btn btn-primary" type="submit">Сохранить</button>
<a class="btn btn-ghost" href="/admin/profiles/{{.Profile.ID}}">Отмена</a>
</div>
</form>
</section>
</main>
</body>
</html>