mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add V2Ray and Shadowsocks Rust support in Wizard adn status page
This commit is contained in:
parent
804aec1589
commit
339198a19e
5 changed files with 251 additions and 16 deletions
|
@ -292,15 +292,23 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:When proxy shadowsocks is used, use it for UDP if VPN down%></label>
|
||||
<label class="cbi-value-title"><%:Shadowsocks UDP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="shadowsocksudp" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","shadowsocksudp") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:When proxy shadowsocks is used, use it for UDP if VPN down%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:When proxy V2Ray VLESS or VMESS is used, use it for UDP%></label>
|
||||
<label class="cbi-value-title"><%:V2Ray/XRay UDP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="v2rayudp" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("v2ray","main_transparent_proxy","redirect_udp") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:When proxy V2Ray/XRay VLESS, VMESS or Trojan is used, use it for UDP%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
|
|
|
@ -163,6 +163,18 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
statusMessage += '<br/>';
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.shadowsocksrust_enabled == true && mArray.openmptcprouter.service_addr != "")
|
||||
{
|
||||
if (mArray.openmptcprouter.shadowsocksrust_service == false)
|
||||
{
|
||||
statusMessage += '<%:ShadowSocks Rust is not running%>';
|
||||
if (mArray.openmptcprouter.shadowsocksrust_service_key == false && mArray.openmptcprouter.shadowsocksrust_service_method !== "none")
|
||||
{
|
||||
statusMessage += ' <i>(' + '<%:empty key%>' + ')</i>';
|
||||
}
|
||||
statusMessage += '<br/>';
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.v2ray_enabled == true && mArray.openmptcprouter.service_addr != "")
|
||||
{
|
||||
if (mArray.openmptcprouter.v2ray_service == false)
|
||||
|
@ -171,6 +183,14 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
statusMessage += '<br/>';
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.xray_enabled == true && mArray.openmptcprouter.service_addr != "")
|
||||
{
|
||||
if (mArray.openmptcprouter.xray_service == false)
|
||||
{
|
||||
statusMessage += '<%:XRay is not running%>';
|
||||
statusMessage += '<br/>';
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.fsro == true)
|
||||
{
|
||||
statusMessage += '<%:Filesystem is readonly%>' + '<br/>';
|
||||
|
@ -194,7 +214,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
statusIcon = "<%=resource%>/openmptcprouter/images/statusError.png";
|
||||
} else if (mArray.openmptcprouter.service_addr != "")
|
||||
{
|
||||
if (mArray.openmptcprouter.v2ray_enabled == false && mArray.openmptcprouter.shadowsocks_enabled == false)
|
||||
if (mArray.openmptcprouter.xray_enabled == false && mArray.openmptcprouter.v2ray_enabled == false && mArray.openmptcprouter.shadowsocks_enabled == false && mArray.openmptcprouter.shadowsocksrust_enabled == false)
|
||||
{
|
||||
statusMessage += '<%:Proxy is DISABLED%>' + '<br/>';
|
||||
}
|
||||
|
@ -285,9 +305,15 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
|
|||
} else if (mArray.openmptcprouter.shadowsocks_enabled == true && mArray.openmptcprouter.proxy_addr == "" && mArray.openmptcprouter.external_check == true)
|
||||
{
|
||||
statusMessage += '<%:Can\'t get public IP address from ShadowSocks%>' + '<br/>';
|
||||
} else if (mArray.openmptcprouter.shadowsocksrust_enabled == true && mArray.openmptcprouter.proxy_addr == "" && mArray.openmptcprouter.external_check == true)
|
||||
{
|
||||
statusMessage += '<%:Can\'t get public IP address from ShadowSocks Rust%>' + '<br/>';
|
||||
} else if (mArray.openmptcprouter.v2ray_enabled == true && mArray.openmptcprouter.proxy_addr == "" && mArray.openmptcprouter.external_check == true)
|
||||
{
|
||||
statusMessage += '<%:Can\'t get public IP address from V2Ray%>' + '<br/>';
|
||||
} else if (mArray.openmptcprouter.xray_enabled == true && mArray.openmptcprouter.proxy_addr == "" && mArray.openmptcprouter.external_check == true)
|
||||
{
|
||||
statusMessage += '<%:Can\'t get public IP address from XRay%>' + '<br/>';
|
||||
} else if (mArray.openmptcprouter.wan_addr == "" && mArray.openmptcprouter.wan_addr6 == "" && mArray.openmptcprouter.external_check == true)
|
||||
{
|
||||
statusMessage += '<%:No public IP address detected in less than 1 second%>' + '<br/>';
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
</fieldset>
|
||||
<fieldset class="cbi-section" id="proxy">
|
||||
<legend><%:Proxy settings%></legend>
|
||||
<div class="cbi-section-descr"><%:By default proxy is used for any traffic that is TCP (and UDP for V2Ray).%></div>
|
||||
<div class="cbi-section-descr"><%:By default proxy is used for any traffic that is TCP (and UDP for V2Ray/XRay).%></div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Default Proxy%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
@ -237,11 +237,17 @@
|
|||
<% if nixio.fs.access("/etc/init.d/v2ray") then %><option value="v2ray-vmess" <% if uci:get("openmptcprouter","settings","proxy") == "v2ray-vmess" then %>selected="selected"<% end %>>V2Ray VMESS</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/v2ray") then %><option value="v2ray-trojan" <% if uci:get("openmptcprouter","settings","proxy") == "v2ray-trojan" then %>selected="selected"<% end %>>V2Ray TROJAN</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/v2ray") then %><option value="v2ray-socks" <% if uci:get("openmptcprouter","settings","proxy") == "v2ray-socks" then %>selected="selected"<% end %>>V2Ray SOCKS</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/xray") then %><option value="xray" <% if uci:get("openmptcprouter","settings","proxy") == "xray" then %>selected="selected"<% end %>>XRay VLESS</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/xray") then %><option value="xray-vmess" <% if uci:get("openmptcprouter","settings","proxy") == "xray-vmess" then %>selected="selected"<% end %>>XRay VMESS</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/xray") then %><option value="xray-trojan" <% if uci:get("openmptcprouter","settings","proxy") == "xray-trojan" then %>selected="selected"<% end %>>XRay Trojan</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/xray") then %><option value="xray-socks" <% if uci:get("openmptcprouter","settings","proxy") == "xray-socks" then %>selected="selected"<% end %>>XRay Socks</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/xray") then %><option value="xray-shadowsocks" <% if uci:get("openmptcprouter","settings","proxy") == "xray-shadowsocks" then %>selected="selected"<% end %>>XRay Shadowsocks 2022</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/shadowsocks-rust") then %><option value="shadowsocks-rust" <% if uci:get("openmptcprouter","settings","proxy") == "shadowsocks-rust" then %>selected="selected"<% end %>>Shadowsocks-Rust 2022</option><% end %>
|
||||
<option value="none" <% if uci:get("openmptcprouter","settings","proxy") == "none" then %>selected="selected"<% end %>>None</option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Set the default Proxy used for TCP when ShadowSocks is enabled, for TCP and UDP when V2Ray VLESS, VMESS or Trojan is enabled.%>
|
||||
<%:Set the default Proxy used for TCP when ShadowSocks is enabled, for TCP and UDP when V2Ray/XRay VLESS, VMESS or Trojan is enabled.%>
|
||||
<%:Only ShadowSocks is supported with server multiple IPs for now.%>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -258,9 +264,21 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/v2ray") then %>
|
||||
<% if nixio.fs.access("/etc/init.d/xray") or nixio.fs.access("/etc/init.d/shadowsocks-rust") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:V2Ray user id%></label>
|
||||
<label class="cbi-value-title"><%:ShadowSocks 2022 key%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="shadowsocks2022_key" placeholder="<%:ShadowSocks 2022 key%>" class="cbi-input-text" value="<%=uci:get("shadowsocks-rust","sss0","password")%>" />
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Key is retrieved from server API by default.%> <%:ShadowSocks is used for TCP.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/v2ray") or nixio.fs.access("/etc/init.d/xray") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:V2Ray/XRay user id%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="v2ray_user" placeholder="<%:V2Ray user%>" class="cbi-input-text" value="<%=uci:get("v2ray","omrout","s_vmess_user_id")%>" />
|
||||
<br />
|
||||
|
@ -284,7 +302,7 @@
|
|||
%>
|
||||
<option value="none" <% if method == "none" then %>selected="selected"<% end %>><%:None%></option>
|
||||
<option value="aes-256-gcm" <% if method == "aes-256-gcm" then %>selected="selected"<% end %>>AES-256-GCM</option>
|
||||
<option value="aes-256-cfb" <% if method == "aes-256-cfb" then %>selected="selected"<% end %>>AES-256-CFB</option>
|
||||
<!--<option value="aes-256-cfb" <% if method == "aes-256-cfb" then %>selected="selected"<% end %>>AES-256-CFB</option>-->
|
||||
<option value="chacha20-ietf-poly1305" <% if method == "chacha20" or method == "chacha20-ietf-poly1305" then %>selected="selected"<% end %>>chacha20</option>
|
||||
<option value="other" <% if method == "other" or (method ~= "chacha20" and method ~= "aes-256-gcm" and method ~= "aes-256-cfb" and method ~= "chacha20-ietf-poly1305" and method ~= "none") then %>selected="selected"<% end %>><%:other%></option>
|
||||
</select>
|
||||
|
@ -297,7 +315,7 @@
|
|||
<% else %>
|
||||
<%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%>
|
||||
<% end %>
|
||||
<%:Encryption method is used for Shadowsocks, V2Ray, Glorytun and OpenVPN.%>
|
||||
<%:Encryption method is used for Shadowsocks, V2Ray/XRay, Glorytun and OpenVPN.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue