public Server(Kanel kanel,OpBase opBase) : base(kanel, opBase, PROTOCOL_KIND.TCP, USE_ACL.ON) { cache = new Cache(this.Logger,this.OpBase); // 上位プロキシを経由しないサーバのリスト Dat dat = opBase.ValDat("disableAddress"); foreach (OneLine oneLine in dat.Lines) { if (oneLine.Enabled) {//有効なデータだけを対象にする disableAddressList.Add((string)oneLine.ValList[0].Obj); } } //URL制限 limitUrl = new LimitUrl(opBase.ValDat("limitUrl"),(opBase.ValRadio("enableUrl")==0)?true:false); //リクエストを通常ログで表示する useRequestLog = opBase.ValBool("useRequestLog"); //コンテンツ制限 limitString = new LimitString(opBase.ValDat("limitString")); if (limitString.Length == 0) limitString = null; dataPort = dataPortMin; //初期化成功(isInitSuccess==trueでないとStart()を実行してもスレッド開始できない) isInitSuccess = true; }
public Server(Kanel kanel, OpBase opBase) : base(kanel, opBase, PROTOCOL_KIND.TCP, USE_ACL.ON) { cache = new Cache(this.Logger, this.OpBase); // 上位プロキシを経由しないサーバのリスト Dat dat = opBase.ValDat("disableAddress"); foreach (OneLine oneLine in dat.Lines) { if (oneLine.Enabled) //有効なデータだけを対象にする { disableAddressList.Add((string)oneLine.ValList[0].Obj); } } //URL制限 limitUrl = new LimitUrl(opBase.ValDat("limitUrl"), (opBase.ValRadio("enableUrl") == 0)?true:false); //リクエストを通常ログで表示する useRequestLog = opBase.ValBool("useRequestLog"); //コンテンツ制限 limitString = new LimitString(opBase.ValDat("limitString")); if (limitString.Length == 0) { limitString = null; } dataPort = dataPortMin; //初期化成功(isInitSuccess==trueでないとStart()を実行してもスレッド開始できない) isInitSuccess = true; }
int indexRecv = 0; //サーバ側からのデータを、どこまで受信完了したかのインデックス public ProxyHttp(Kanel kanel, OpBase opBase, Proxy proxy, Cache cache, LimitString limitString) { this.kanel = kanel; this.opBase = opBase; this.proxy = proxy; this.Cache = cache; this.LimitString = limitString; }
int _indexRecv; //サーバ側からのデータを、どこまで受信完了したかのインデックス public ProxyHttp(Proxy proxy, Kernel kernel, Conf conf, Cache cache, LimitString limitString) : base(proxy) { _kernel = kernel; //_oneOption = oneOption; _conf = conf; _cache = cache; LimitString = limitString; KeepAlive = true;//デフォルトで継続型 }
int _indexServer; //サーバ側にどこまで送信を完了したかのインデックス #endregion Fields #region Constructors public ProxyHttp(Proxy proxy, Kernel kernel, Conf conf, Cache cache, LimitString limitString) : base(proxy) { _kernel = kernel; //_oneOption = oneOption; _conf = conf; _cache = cache; LimitString = limitString; KeepAlive = true;//デフォルトで継続型 }
public Server(Kernel kernel, Conf conf, OneBind oneBind) : base(kernel, conf, oneBind) { _cache = new Cache(kernel, this.Logger, conf); // 上位プロキシを経由しないサーバのリスト foreach (var o in (Dat)Conf.Get("disableAddress")) { if (o.Enable) //有効なデータだけを対象にする { _disableAddressList.Add(o.StrList[0]); } } //URL制限 var allow = (Dat)Conf.Get("limitUrlAllow"); var deny = (Dat)Conf.Get("limitUrlDeny"); //Ver5.4.5正規表現の誤りをチェックする for (var i = 0; i < 2; i++) { foreach (var a in (i == 0) ? allow : deny) { if (a.Enable && a.StrList[1] == "3") //正規表現 { try { var regex = new Regex(a.StrList[0]); } catch { Logger.Set(LogKind.Error, null, 28, a.StrList[0]); } } } } _limitUrl = new LimitUrl(allow, deny); //アクセス元プログラム制限 var allowProg = (Dat)Conf.Get("limitSrcProgAllow"); var denyProg = (Dat)Conf.Get("limitSrcProgDeny"); _limitSrcProg = new LimitSrcProg(this.Logger, allowProg, denyProg); //リクエストを通常ログで表示する _useRequestLog = (bool)Conf.Get("useRequestLog"); //コンテンツ制限 _limitString = new LimitString((Dat)Conf.Get("limitString")); if (_limitString.Length == 0) { _limitString = null; } _dataPort = DataPortMin; }
public Server(Kernel kernel, Conf conf,OneBind oneBind) : base(kernel, conf,oneBind) { _cache = new Cache(kernel,this.Logger,conf); // 上位プロキシを経由しないサーバのリスト foreach (var o in (Dat)Conf.Get("disableAddress")) { if (o.Enable) {//有効なデータだけを対象にする _disableAddressList.Add(o.StrList[0]); } } //URL制限 var allow = (Dat)Conf.Get("limitUrlAllow"); var deny = (Dat)Conf.Get("limitUrlDeny"); //Ver5.4.5正規表現の誤りをチェックする for (var i = 0; i < 2; i++) { foreach (var a in (i == 0) ? allow : deny) { if (a.Enable && a.StrList[1] == "3") {//正規表現 try { var regex = new Regex(a.StrList[0]); } catch { Logger.Set(LogKind.Error, null, 28, a.StrList[0]); } } } } _limitUrl = new LimitUrl(allow,deny); //リクエストを通常ログで表示する _useRequestLog = (bool)Conf.Get("useRequestLog"); //コンテンツ制限 _limitString = new LimitString((Dat)Conf.Get("limitString")); if (_limitString.Length == 0) _limitString = null; _dataPort = DataPortMin; }
public ProxyHttp(Kanel kanel,OpBase opBase,Proxy proxy,Cache cache,LimitString limitString) { this.kanel = kanel; this.opBase = opBase; this.proxy = proxy; this.Cache = cache; this.LimitString = limitString; }