{% extends "console/base.html" %} {% load ostium_ui %} {% block title %}线路{% endblock %} {% block breadcrumb %}线路{% endblock %} {% block page_header %}
{% icon "lan" "w-3.5 h-3.5" %} Inbounds

线路与协议

四条服务端线路。保存后由 worker 生成配置、用 sing-box check 校验,再平滑应用。

{% if state.desired_revision == state.applied_revision %}配置已同步{% else %}等待应用 rev {{ state.desired_revision }}{% endif %} {% icon "settings" %} 高级编辑
{% endblock %} {% block content %} {% if state.last_error %}
{% icon "alert" %}
最近一次应用失败:{{ state.last_error|truncatechars:300 }}
{% endif %}
{% for record in records %} {% with form=forms|get_item:record.kind %}
{% if record.kind == "vless" %}VL{% elif record.kind == "hysteria2" %}H2{% elif record.kind == "trojan" %}TR{% else %}SS{% endif %} {{ record.label }}
{% if record.kind == "vless" %}VLESS + Reality + XTLS Vision {% elif record.kind == "hysteria2" %}QUIC / UDP,低延迟高吞吐 {% elif record.kind == "trojan" %}TLS 伪装,兼容性广 {% else %}Shadowsocks 2022,多用户密钥{% endif %}
{% if record.enabled %}已启用{% else %}未启用{% endif %}
{% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
{% csrf_token %}
{{ form.listen }} {{ form.listen.errors }}
{{ form.port }} {{ form.port.errors }}
{% if record.needs_certificate %}
{{ form.certificate }} {{ form.certificate.errors }} 此协议需要先导入/同步证书。 证书管理 · 导入证书
{% endif %}
{{ form.enabled.errors }}
{% if record.kind == "vless" %}
Reality 公钥
{{ record.params.public_key|default:"—" }}
Short ID
{{ record.params.short_id|default:"—" }}
SNI
{{ record.params.server_name|default:"—" }}
{% elif record.kind == "shadowsocks" %}
加密方法
{{ record.params.method|default:"—" }}
多用户
2022 用户密钥
{% elif record.kind == "hysteria2" %}
混淆
{% if record.params.obfs_password %}salamander{% else %}未启用{% endif %}
传输
QUIC / UDP
{% else %}
传输
TLS / TCP
证书
{{ record.certificate.domain|default:"未分配" }}
{% endif %}
{% if record.validation_errors %}
{% icon "alert" %}
还不能启用: {% for error in record.validation_errors %}{{ error }}{% if not forloop.last %};{% endif %}{% endfor %}
{% endif %}
{% if record.kind != "trojan" %} {% endif %}
{% endwith %} {% empty %}
{% icon "lan" %}
还没有线路
运行 ostium inbound init 创建四条默认线路。
{% endfor %}
{% icon "shield" %} 端口与证书提示

· 同一 TCP 端口不能同时被 VLESS、Trojan 或 Shadowsocks 使用;Hysteria2 使用 UDP,可与 TCP 443 共存。

· Hysteria2 与 Trojan 必须分配状态为“可用”的证书;证书到期会阻止配置应用。

· Reality 使用自己的密钥对与 SNI,不需要证书;轮换后请重新分发订阅。

{% endblock %}