KLALB2.3
This commit is contained in:
@@ -19,31 +19,26 @@ public class FrpcIni extends Ini {
|
||||
|
||||
public FrpcIni(File input) throws IOException, InvalidFileFormatException {
|
||||
super(input);
|
||||
// TODO 自动生成的构造函数存根
|
||||
}
|
||||
|
||||
public FrpcIni(InputStream input) throws IOException, InvalidFileFormatException {
|
||||
super(input);
|
||||
// TODO 自动生成的构造函数存根
|
||||
}
|
||||
|
||||
public FrpcIni(Reader input) throws IOException, InvalidFileFormatException {
|
||||
super(input);
|
||||
// TODO 自动生成的构造函数存根
|
||||
}
|
||||
|
||||
public FrpcIni(URL input) throws IOException, InvalidFileFormatException {
|
||||
super(input);
|
||||
// TODO 自动生成的构造函数存根
|
||||
}
|
||||
|
||||
public FrpcIni(String str) throws InvalidFileFormatException {
|
||||
this();
|
||||
loadFromString(str);
|
||||
public FrpcIni(String str) throws IOException ,InvalidFileFormatException{
|
||||
super(new StringReader(str));
|
||||
}
|
||||
|
||||
public void setServerAddr(String addr) {
|
||||
add("common", "server_addr", addr);
|
||||
put("common", "server_addr", addr);
|
||||
}
|
||||
|
||||
public String getServerAddr() {
|
||||
@@ -51,7 +46,7 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setToken(String addr) {
|
||||
add("common", "token", addr);
|
||||
put("common", "token", addr);
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
@@ -59,7 +54,7 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setProtocol(String protocol) {
|
||||
add("common", "protocol", protocol);
|
||||
put("common", "protocol", protocol);
|
||||
}
|
||||
|
||||
public String getProtocol() {
|
||||
@@ -67,7 +62,7 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setServerPort(int port) {
|
||||
add("common", "server_port", port);
|
||||
put("common", "server_port", port);
|
||||
}
|
||||
|
||||
public int getServerPort() {
|
||||
@@ -75,14 +70,14 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setDnsServer(String dns) {
|
||||
add("common", "dns_server", dns);
|
||||
put("common", "dns_server", dns);
|
||||
}
|
||||
|
||||
public String getDnsServer() {
|
||||
return get("common", "dns_server");
|
||||
}
|
||||
public void setConnectServerLocalIp(String connectserverlocalip) {
|
||||
add("common", "connect_server_local_ip", connectserverlocalip);
|
||||
put("common", "connect_server_local_ip", connectserverlocalip);
|
||||
}
|
||||
|
||||
public String getConnectServerLocalIp() {
|
||||
@@ -90,7 +85,7 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setUser(String user) {
|
||||
add("common", "user", user);
|
||||
put("common", "user", user);
|
||||
}
|
||||
|
||||
public String getUser() {
|
||||
@@ -98,7 +93,7 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setTcpMux(boolean tcpmux) {
|
||||
add("common", "tcp_mux", tcpmux);
|
||||
put("common", "tcp_mux", tcpmux);
|
||||
}
|
||||
|
||||
public boolean getTcpMux() {
|
||||
@@ -106,7 +101,7 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setTlsEnable(boolean tlsenable) {
|
||||
add("common", "tls_enable", tlsenable);
|
||||
put("common", "tls_enable", tlsenable);
|
||||
}
|
||||
|
||||
public boolean getTlsEnable() {
|
||||
@@ -125,63 +120,63 @@ public class FrpcIni extends Ini {
|
||||
|
||||
|
||||
public void setType(String tunnel,String type) {
|
||||
add(tunnel, "type", type);
|
||||
put(tunnel, "type", type);
|
||||
}
|
||||
|
||||
public String getType(String tunnel) {
|
||||
return get(tunnel, "type");
|
||||
}
|
||||
public void setLocalIP (String tunnel,String localip) {
|
||||
add(tunnel, "local_ip", localip);
|
||||
put(tunnel, "local_ip", localip);
|
||||
}
|
||||
|
||||
public String getLocalIP(String tunnel) {
|
||||
return get(tunnel, "local_ip");
|
||||
}
|
||||
public void setLocalPort (String tunnel,int localport) {
|
||||
add(tunnel, "local_port", localport);
|
||||
put(tunnel, "local_port", localport);
|
||||
}
|
||||
|
||||
public int getLocalPort(String tunnel) {
|
||||
return get(tunnel, "local_port",int.class);
|
||||
}
|
||||
public void setRemotePort (String tunnel,int remoteport) {
|
||||
add(tunnel, "remote_port", remoteport);
|
||||
put(tunnel, "remote_port", remoteport);
|
||||
}
|
||||
|
||||
public int getRemotePort(String tunnel) {
|
||||
return get(tunnel, "remote_port",int.class);
|
||||
}
|
||||
public void setUseEncryption (String tunnel,boolean useencryption) {
|
||||
add(tunnel, "use_encryption", useencryption);
|
||||
put(tunnel, "use_encryption", useencryption);
|
||||
}
|
||||
|
||||
public boolean getUseEncryption(String tunnel) {
|
||||
return get(tunnel, "use_encryption",boolean.class);
|
||||
}
|
||||
public void setUseCompression (String tunnel,boolean usecompression) {
|
||||
add(tunnel, "use_compression", usecompression);
|
||||
put(tunnel, "use_compression", usecompression);
|
||||
}
|
||||
|
||||
public boolean getUseCompression(String tunnel) {
|
||||
return get(tunnel, "use_compression",boolean.class);
|
||||
}
|
||||
public void setSk(String tunnel,String sk) {
|
||||
add(tunnel, "sk", sk);
|
||||
put(tunnel, "sk", sk);
|
||||
}
|
||||
|
||||
public String getSk(String tunnel) {
|
||||
return get(tunnel, "sk");
|
||||
}
|
||||
public void setRole(String tunnel,String sk) {
|
||||
add(tunnel, "role", sk);
|
||||
put(tunnel, "role", sk);
|
||||
}
|
||||
|
||||
public String getRole(String tunnel) {
|
||||
return get(tunnel, "role");
|
||||
}
|
||||
public void setServerName(String tunnel,String servername) {
|
||||
add(tunnel, "server_name", servername);
|
||||
put(tunnel, "server_name", servername);
|
||||
}
|
||||
|
||||
public String getServerName(String tunnel) {
|
||||
@@ -189,21 +184,21 @@ public class FrpcIni extends Ini {
|
||||
}
|
||||
|
||||
public void setBindAddr(String tunnel,String bindaddr) {
|
||||
add(tunnel, "bind_addr", bindaddr);
|
||||
put(tunnel, "bind_addr", bindaddr);
|
||||
}
|
||||
|
||||
public String getBindAddr(String tunnel) {
|
||||
return get(tunnel, "bind_addr");
|
||||
}
|
||||
public void setBindPort (String tunnel,int bindport) {
|
||||
add(tunnel, "bind_port", bindport);
|
||||
put(tunnel, "bind_port", bindport);
|
||||
}
|
||||
|
||||
public int getBindPort(String tunnel) {
|
||||
return get(tunnel, "bind_port",int.class);
|
||||
}
|
||||
public void setKeepTunnelOpen (String tunnel,boolean keeptunnelopen) {
|
||||
add(tunnel, "keep_tunnel_open", keeptunnelopen);
|
||||
put(tunnel, "keep_tunnel_open", keeptunnelopen);
|
||||
}
|
||||
|
||||
public boolean getKeepTunnelOpen(String tunnel) {
|
||||
@@ -215,6 +210,7 @@ public class FrpcIni extends Ini {
|
||||
StringWriter sw = new StringWriter();
|
||||
try {
|
||||
store(sw);
|
||||
//System.out.println(sw);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user