Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 25b4b45

Browse files
committed
move transport settings into outbound settings
1 parent 5a6e06b commit 25b4b45

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

V2RayW/ConfigForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private void ConfigForm_Load(object sender, EventArgs e)
7575
profiles.Add(p.DeepCopy());
7676
}
7777

78-
Properties.Settings.Default.Upgrade();
78+
//Properties.Settings.Default.Upgrade();
7979
comboBoxInP.SelectedIndex = Properties.Settings.Default.inProtocol;
8080
textBoxLocalPort.Text = Properties.Settings.Default.localPort.ToString();
8181
checkBoxUDP.Checked = Properties.Settings.Default.udpSupport;

V2RayW/FormTransSetting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private void buttonTSSave_Click(object sender, EventArgs e)
7373

7474
private void FormTransSetting_Load(object sender, EventArgs e)
7575
{
76-
Properties.Settings.Default.Upgrade();
76+
//Properties.Settings.Default.Upgrade();
7777
string transportSettingsStr = Properties.Settings.Default.transportSettings;
7878
dynamic transportSettings = JObject.Parse(transportSettingsStr);
7979
textBoxKcpMtu.Text = transportSettings.kcpSettings.mtu;

V2RayW/Program.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static int proxyMode
4848
}
4949
}
5050
public static MainForm mainForm;
51-
const string v2rayVersion = "v2.13.1";
51+
const string v2rayVersion = "v2.13.2";
5252
static BackgroundWorker v2rayCoreWorker = new BackgroundWorker();
5353
public static AutoResetEvent _resetEvent = new AutoResetEvent(false);
5454
public static bool finalAction = false;
@@ -83,7 +83,7 @@ static void Main()
8383
}
8484
case 1:
8585
{
86-
DialogResult res = MessageBox.Show(String.Format("Unknown version of v2ray core.\n{0} is suggested. Do you want to continue to use existing core?", Program.v2rayVersion), "Unknown v2ray.exe!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
86+
DialogResult res = MessageBox.Show(String.Format("Unknown version of v2ray core detected, which may not be compatible with V2RayW.\n{0} is suggested. Do you want to continue to use the existing core?", Program.v2rayVersion), "Unknown v2ray.exe!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
8787
if (res == DialogResult.OK)
8888
{
8989
break;
@@ -304,7 +304,7 @@ public static bool generateConfigJson()
304304
{
305305
string templateStr = Encoding.UTF8.GetString(proxyMode == 0 ? Properties.Resources.config_rules : Properties.Resources.config_simple);
306306
dynamic json = JObject.Parse(templateStr);
307-
json.transport = JObject.Parse(Properties.Settings.Default.transportSettings);
307+
//json.transport = JObject.Parse(Properties.Settings.Default.transportSettings);
308308
json.inbound.port = Properties.Settings.Default.localPort;
309309
json.inbound.protocol = Properties.Settings.Default.inProtocol == 0 ? "socks" : "http";
310310
if (Properties.Settings.Default.inProtocol == 0)
@@ -327,6 +327,10 @@ public static bool generateConfigJson()
327327
json.outbound.settings.vnext[0].users[0].alterId = profiles[selectedServerIndex].alterId;
328328
json.outbound.settings.vnext[0].users[0].security = (new string[] { "aes-128-cfb", "aes-128-gcm", "chacha20-poly1305" })[profiles[selectedServerIndex].security % 3];
329329
json.outbound.streamSettings.network = (new string[]{ "tcp", "kcp", "ws" })[profiles[selectedServerIndex].network % 3];
330+
var ts = JObject.Parse(Properties.Settings.Default.transportSettings);
331+
json.outbound.streamSettings.tcpSettings = ts["tcpSettings"];
332+
json.outbound.streamSettings.kcpSettings = ts["kcpSettings"];
333+
json.outbound.streamSettings.wsSettings = ts["wsSettings"];
330334
var dnsArray = Properties.Settings.Default.dns.Split(',');
331335
json.dns = JObject.Parse(dnsArray.Count() > 0 ? JsonConvert.SerializeObject( new { servers = dnsArray }) : "{\"servers\":[\"localhost\"]}");
332336
try

V2RayW/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// You can specify all the values or you can default the Build and Revision Numbers
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("0.0.5.0")]
37-
[assembly: AssemblyFileVersion("0.0.5.0")]
36+
[assembly: AssemblyVersion("0.0.6.0")]
37+
[assembly: AssemblyFileVersion("0.0.6.0")]
3838
[assembly: NeutralResourcesLanguage("")]
3939

0 commit comments

Comments
 (0)