Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Commit

Permalink
ipify로 ip 획득 서버 변경.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZCube committed Apr 27, 2017
1 parent ea6c0cd commit d4daec2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ACTWebSocket.Core/ACTWebSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,11 @@ private void ACTWebSocket_Load(object sender, EventArgs e)
addrs.Sort();
core.SetAddress(addrs);

foreach (var addr in addrs)
{
hostnames.Items.Add(addr);
}

Task task = Task.Factory.StartNew(() =>
{
String ipaddress = Utility.GetExternalIp();
Expand All @@ -1136,6 +1141,7 @@ private void ACTWebSocket_Load(object sender, EventArgs e)
});
Task UITask = task.ContinueWith((t) =>
{
hostnames.Items.Clear();
foreach (var addr in addrs)
{
hostnames.Items.Add(addr);
Expand Down
2 changes: 1 addition & 1 deletion ACTWebSocket.Core/Functions/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static string Str2Hex(string strData)
}
public static String GetExternalIp()
{
string whatIsMyIp = "http://act.project.so/ip.php";
string whatIsMyIp = "https://api.ipify.org";
ToggleAllowUnsafeHeaderParsing(true);
WebClient wc = new WebClient();
UTF8Encoding utf8 = new UTF8Encoding();
Expand Down

0 comments on commit d4daec2

Please sign in to comment.