Shadowsocks update web UI to set timeout and udp fragmentation (#4967)

This commit is contained in:
eguun 2025-10-06 09:05:03 +02:00 committed by GitHub
parent 320de1124a
commit 73a32e2e44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 3 deletions

View file

@ -6,6 +6,7 @@ Plugin Changelog
1.3
* Update ciphers to match shadowsocks-rust (contributed by eguun)
* Update WebUI to allow setting for TCP timeout and UDP fragmentation (contributed by kvoffka and eguun)
1.2

View file

@ -41,4 +41,17 @@
<type>dropdown</type>
<help>Choose TCP, UDP or both relay mode</help>
</field>
<field>
<id>general.timeout</id>
<label>Timeout</label>
<type>text</type>
<hint>60</hint>
<help>Set the TCP relay timeout in seconds.</help>
</field>
<field>
<id>general.fragmentation</id>
<label>Fragmentation</label>
<type>checkbox</type>
<help>Allow IP fragmentation on the outbound UDP socket.</help>
</field>
</form>

View file

@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/shadowsocks/general</mount>
<description>Shadowsocks configuration</description>
<version>1.0.1</version>
<version>1.0.2</version>
<items>
<enabled type="BooleanField">
<Default>0</Default>
@ -63,5 +63,13 @@
<tcp_and_udp>TCP and UDP</tcp_and_udp>
</OptionValues>
</tcpudpmode>
<timeout type="IntegerField">
<Default>60</Default>
<Required>Y</Required>
</timeout>
<fragmentation type="BooleanField">
<Default>0</Default>
<Required>Y</Required>
</fragmentation>
</items>
</model>

View file

@ -4,8 +4,9 @@
"server_port":{{ OPNsense.shadowsocks.general.serverport }},
"local_port":{{ OPNsense.shadowsocks.general.localport }},
"password":"{{ OPNsense.shadowsocks.general.password }}",
"timeout":60,
"timeout":{{ OPNsense.shadowsocks.general.timeout }},
"mode":"{{ OPNsense.shadowsocks.general.tcpudpmode }}",
"method":"{{ OPNsense.shadowsocks.general.cipher }}"
"method":"{{ OPNsense.shadowsocks.general.cipher }}",
"outbound_udp_allow_fragmentation":{{ "true" if OPNsense.shadowsocks.general.fragmentation == '1' else "false"}}
}
{% endif %}