private static string ReadStr(string key) { string value = Conf.ReadValue(key); if (value == null) { Console.WriteLine("{0} not found.", key); } else { Console.WriteLine("{0}:{1}", key, value); } return(value); }
public void Init(string arg) { if (Regex.IsMatch(arg, @"\bc=*")) { Conf.confPath = arg.Substring(2); } Conf.Init(); string[] remoteHttpAddresses = Conf.ReadValue("Remote HTTP Address"); string[] localHttpAddresses = Conf.ReadValue("Local HTTP Address"); string[] remoteSocksAddresses = Conf.ReadValue("Remote SOCKS Address"); string[] localSocksAddresses = Conf.ReadValue("Local SOCKS Address"); remoteHttpIPEPs = CreateEndPoints(Conf.ReadStrs_Split(remoteHttpAddresses)); remoteSocksIPEPs = CreateEndPoints(Conf.ReadStrs_Split(remoteSocksAddresses)); localHttpIPEPs = CreateEndPoints(Conf.ReadStrs_Split(localHttpAddresses)); localSocksIPEPs = CreateEndPoints(Conf.ReadStrs_Split(localSocksAddresses)); }