1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2023-09-29 15:02:19 +02:00
parent 804aec1589
commit 339198a19e
5 changed files with 251 additions and 16 deletions

View file

@ -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>