package top.octopusyan.config; import java.util.HashMap; import java.util.Map; /** * @author : octopus yan * @email : octopus_yan@foxmail.com * @description : 代理设置 * @create : 2022-4-5 18:14 */ public class ProxyConfig { private static Map serverPath = new HashMap<>(); private static Map typePort = new HashMap<>(); static { serverPath.put("香港", "xg.frp.octopusyan.top"); serverPath.put("北京", "bj.frp.octopusyan.top"); serverPath.put("上海", "frp.octopusyan.top"); typePort.put("http", 80); typePort.put("https", 80); typePort.put("ssh", 22); typePort.put("tcp", 0); } public enum ProxyServer { 香港, 北京, 上海 } public enum ProxyType { HTTP("http"), HTTPS("https"), SSH("tcp"), TCP("tcp"), ; private String type; public String getType() { return type; } ProxyType(String type) { this.type = type; } } public static String getServerPath(String serverName) { return serverPath.get(serverName); } public static Integer getTypePort(String type) { return typePort.get(type); } }