private void RunTrojan() { if (IsConfigValid()) { InitialTemp(); try { File.WriteAllText("node.tcsdb", ShareLink.Generate(RemoteAddressBox.Text, RemotePortBox.Text, PasswordBox.Text)); } catch { Message.Show("Conf file written failed!", Message.Mode.Error); goto final; } KillProcess(); SaveTrojanConf(); RunTrojanCommand(); if (isHttp.Checked == true) { RunPivoxyCommand(); Proxy.SetProxy("127.0.0.1:54392"); } Message.Show("Stop Trojan succeeded!", Message.Mode.Info); final :; } else { Message.Show("Config invalid! Please enter current trojan information.", Message.Mode.Error); } }
private void Conf2ShareLink() => ShareLinkBox.Text = ShareLink.Generate(RemoteAddressBox.Text, RemotePortBox.Text, PasswordBox.Text);