mirror of https://github.com/FongMi/TV.git
parent
1bd56fd983
commit
5efa2fbbab
@ -0,0 +1,20 @@ |
||||
package com.github.catvod; |
||||
|
||||
import com.github.catvod.utils.Util; |
||||
|
||||
public class Proxy { |
||||
|
||||
private static int port = 9978; |
||||
|
||||
public static void set(int port) { |
||||
Proxy.port = port; |
||||
} |
||||
|
||||
public static int getPort() { |
||||
return port; |
||||
} |
||||
|
||||
public static String getUrl(boolean local) { |
||||
return "http://" + (local ? "127.0.0.1" : Util.getIp()) + ":" + getPort() + "/proxy"; |
||||
} |
||||
} |
||||
@ -1,14 +0,0 @@ |
||||
package com.fongmi.quickjs.utils; |
||||
|
||||
public class Proxy { |
||||
|
||||
private static int port = 9978; |
||||
|
||||
public static void set(int port) { |
||||
Proxy.port = port; |
||||
} |
||||
|
||||
public static String getUrl() { |
||||
return "http://127.0.0.1:" + port + "/proxy"; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue