公网访问相关
This commit is contained in:
commit
a5f08f1f8e
4 files changed
+183
-78
No files matched your search
+5
-2
@@ -17,7 +17,10 @@ namespace SunlightAggregationTerminal.Class
|
||||
|
||||
public static async void Configuration(string ip, string Name, string Password, string Terminal)
|
||||
{
|
||||
DataReceived.ServerIP = ip;
|
||||
string[] parts = ip.Split('/');
|
||||
|
||||
DataReceived.ServerIP = parts[0];
|
||||
DataReceived.ServerURL = parts[1];
|
||||
DataReceived.ServerName = Name;
|
||||
DataReceived.ServerPassword = Password;
|
||||
DataReceived.ServerTerminal = Terminal;
|
||||
@@ -89,7 +92,7 @@ namespace SunlightAggregationTerminal.Class
|
||||
var request = new HttpRequest();
|
||||
request.SetContent(new StringHttpContent(JsonSerializer.Serialize(dat), Encoding.UTF8, "application/scjson"))
|
||||
.InitHeaders()
|
||||
.SetUrl("/H")
|
||||
.SetUrl(DataReceived.ServerURL)
|
||||
.SetHost(httpclient.RemoteIPHost.Host)
|
||||
.AsPost();
|
||||
|
||||
|
||||
Reference in new issue
Block a user