Ejemplo n.º 1
0
        public ProxletsPool(SuProxyConfiguration config)
        {
            this.config = config;

            this.proxlets = new Proxlet[config.ProxletsPoolSize];
            for (int i = 0; i < this.proxlets.Length; i++)
            {
                this.proxlets[i] = new HttpProxlet(this, config);
            }
        }
Ejemplo n.º 2
0
 public HttpProxlet(ProxletsPool pool, SuProxyConfiguration config)
     : base(pool)
 {
     lock (initiLock)
     {
         if (httpPipesChainsFactory == null && config.ConfigurationFiles != null)
         {
             httpPipesChainsFactory = new HttpPipesChainsFactory(config);
         }
     }
 }
Ejemplo n.º 3
0
        private void btnStartProxy_Click(object sender, EventArgs e)
        {
            SuProxyConfiguration spc = new SuProxyConfiguration(8080, 100, 20, 2 * 60 * 1000, 2);

            spc.ConfigurationFiles = new String[] {
                Path.GetDirectoryName(Assembly.GetAssembly(typeof(SuProxyControlPanelForm)).Location) + "\\conf\\SuProxy.default.config",
                Path.GetDirectoryName(Assembly.GetAssembly(typeof(SuProxyControlPanelForm)).Location) + "\\conf\\SuProxy.Standalone.config"
            };

            proxyServer = new SuProxyServer(spc);
            proxyServer.Start();
            btnStartProxy.Enabled = false;
        }
Ejemplo n.º 4
0
 public HttpPipesChainsFactory(SuProxyConfiguration config)
 {
     pipesChains = new Dictionary <String, ChainObject[]>();
     LoadChains(config.ConfigurationFiles);
     httpPipesRepository = new HttpPipesRepository(config);
 }
Ejemplo n.º 5
0
 public HttpPipesRepository(SuProxyConfiguration config)
 {
     this.config    = config;
     availablePipes = new Dictionary <String, HttpPipeMeta>();
     LoadPipes(config.ConfigurationFiles);
 }