示例#1
0
 private static void Main(string[] args)
 {
     Program.app = new TtvProxy(true);
     Dictionary<string, string> parameters = Program.GetParameters(args);
     if (parameters.Count >= 2)
     {
         TtvProxy.MySettings.SetSetting("torrent-tv.ru", "login", 
             parameters.ContainsKey("-u") ? (object)parameters["-u"] : (object)parameters["0"]);
         TtvProxy.MySettings.SetSetting("torrent-tv.ru", "password", 
             (object)CryptoHelper.Encrypt<AesCryptoServiceProvider>(parameters.ContainsKey("-p") ? parameters["-p"] : parameters["1"], Environment.MachineName, "4<_I'nQ"));
     }
     Program.app.Start();
     while (true)
         Thread.Sleep(1000);
 }
示例#2
0
 public TTVProxyDevice(WebServer webServer, TtvProxy proxy)
 {
     webServer.AddRouteUrl("/login", new Action<MyWebRequest>(this.LoginRequest), HttpMethod.Get);
     this.Web = webServer;
     this.Proxy = proxy;
 }