@@ -311,7 +311,7 @@ private void ButtonOpenFileDialog_Click(object sender, RoutedEventArgs e)
311
311
}
312
312
#endregion
313
313
314
- #region 界面控件的有效无效控制代码块
314
+ #region 主界面控件的有效无效控制代码块
315
315
private void RadioButtonNoProxy_Checked ( object sender , RoutedEventArgs e )
316
316
{
317
317
TextBlockProxyHost . IsEnabled = false ;
@@ -783,6 +783,10 @@ private void StartSetUpV2ray(ConnectionInfo connectionInfo,TextBlock textBlockNa
783
783
if ( serverConfig . Contains ( "mkcp" ) == true )
784
784
{
785
785
serverJson [ "inbounds" ] [ 0 ] [ "streamSettings" ] [ "kcpSettings" ] [ "header" ] [ "type" ] = ReceiveConfigurationParameters [ 5 ] ;
786
+ if ( String . IsNullOrEmpty ( ReceiveConfigurationParameters [ 6 ] ) == false )
787
+ {
788
+ serverJson [ "inbounds" ] [ 0 ] [ "streamSettings" ] [ "kcpSettings" ] [ "seed" ] = ReceiveConfigurationParameters [ 6 ] ;
789
+ }
786
790
}
787
791
//quic模式下设置伪装类型及密钥
788
792
if ( serverConfig . Contains ( "quic" ) == true )
@@ -823,13 +827,13 @@ private void StartSetUpV2ray(ConnectionInfo connectionInfo,TextBlock textBlockNa
823
827
{
824
828
client . RunCommand ( "ufw allow 80" ) ;
825
829
client . RunCommand ( "ufw allow 443" ) ;
826
- client . RunCommand ( "yes | ufw reset " ) ;
830
+ client . RunCommand ( "yes | ufw reload " ) ;
827
831
}
828
832
else
829
833
{
830
834
client . RunCommand ( $ "ufw allow { openFireWallPort } /tcp") ;
831
835
client . RunCommand ( $ "ufw allow { openFireWallPort } /udp") ;
832
- client . RunCommand ( "yes | ufw reset " ) ;
836
+ client . RunCommand ( "yes | ufw reload " ) ;
833
837
}
834
838
}
835
839
@@ -987,6 +991,10 @@ private void StartSetUpV2ray(ConnectionInfo connectionInfo,TextBlock textBlockNa
987
991
if ( clientConfig . Contains ( "mkcp" ) == true )
988
992
{
989
993
clientJson [ "outbounds" ] [ 0 ] [ "streamSettings" ] [ "kcpSettings" ] [ "header" ] [ "type" ] = ReceiveConfigurationParameters [ 5 ] ;
994
+ if ( String . IsNullOrEmpty ( ReceiveConfigurationParameters [ 6 ] ) == false )
995
+ {
996
+ clientJson [ "outbounds" ] [ 0 ] [ "streamSettings" ] [ "kcpSettings" ] [ "seed" ] = ReceiveConfigurationParameters [ 6 ] ;
997
+ }
990
998
}
991
999
if ( clientConfig . Contains ( "quic" ) == true )
992
1000
{
@@ -1703,13 +1711,13 @@ private void StartSetUpTrojan(ConnectionInfo connectionInfo, TextBlock textBlock
1703
1711
{
1704
1712
client . RunCommand ( "ufw allow 80" ) ;
1705
1713
client . RunCommand ( "ufw allow 443" ) ;
1706
- client . RunCommand ( "yes | ufw reset " ) ;
1714
+ client . RunCommand ( "yes | ufw reload " ) ;
1707
1715
}
1708
1716
else
1709
1717
{
1710
1718
client . RunCommand ( $ "ufw allow { openFireWallPort } /tcp") ;
1711
1719
client . RunCommand ( $ "ufw allow { openFireWallPort } /udp") ;
1712
- client . RunCommand ( "yes | ufw reset " ) ;
1720
+ client . RunCommand ( "yes | ufw reload " ) ;
1713
1721
}
1714
1722
}
1715
1723
@@ -2321,13 +2329,13 @@ private void StartSetUpTrojanGo(ConnectionInfo connectionInfo, TextBlock textBlo
2321
2329
//{
2322
2330
client . RunCommand ( "ufw allow 80" ) ;
2323
2331
client . RunCommand ( "ufw allow 443" ) ;
2324
- client . RunCommand ( "yes | ufw reset " ) ;
2332
+ client . RunCommand ( "yes | ufw reload " ) ;
2325
2333
//}
2326
2334
//else
2327
2335
//{
2328
2336
// client.RunCommand($"ufw allow {openFireWallPort}/tcp");
2329
2337
// client.RunCommand($"ufw allow {openFireWallPort}/udp");
2330
- // client.RunCommand("yes | ufw reset ");
2338
+ // client.RunCommand("yes | ufw reload ");
2331
2339
//}
2332
2340
}
2333
2341
@@ -2885,13 +2893,13 @@ private void StartSetUpNaive(ConnectionInfo connectionInfo, TextBlock textBlockN
2885
2893
{
2886
2894
client . RunCommand ( "ufw allow 80" ) ;
2887
2895
client . RunCommand ( "ufw allow 443" ) ;
2888
- client . RunCommand ( "yes | ufw reset " ) ;
2896
+ client . RunCommand ( "yes | ufw reload " ) ;
2889
2897
}
2890
2898
else
2891
2899
{
2892
2900
client . RunCommand ( $ "ufw allow { openFireWallPort } /tcp") ;
2893
2901
client . RunCommand ( $ "ufw allow { openFireWallPort } /udp") ;
2894
- client . RunCommand ( "yes | ufw reset " ) ;
2902
+ client . RunCommand ( "yes | ufw reload " ) ;
2895
2903
}
2896
2904
}
2897
2905
@@ -4229,7 +4237,7 @@ private void StartSetUp3in1(ConnectionInfo connectionInfo, TextBlock textBlockNa
4229
4237
4230
4238
client . RunCommand ( "ufw allow 80" ) ;
4231
4239
client . RunCommand ( "ufw allow 443" ) ;
4232
- client . RunCommand ( "yes | ufw reset " ) ;
4240
+ client . RunCommand ( "yes | ufw reload " ) ;
4233
4241
}
4234
4242
4235
4243
currentStatus = "符合安装要求,V2ray安装中......" ;
0 commit comments