Ejemplo n.º 1
0
 public static void BeforeClass()
 {
     //設定ファイルの退避と上書き
     _op = new TmpOption("WebServerTest","WebServerTest.ini");
     var _kernel = new Kernel();
     option = _kernel.ListOption.Get("Web-localhost:88");
 }
Ejemplo n.º 2
0
        public Option(Kernel kernel, string path, string nameTag)
            : base(kernel.IsJp(), path, nameTag)
        {
            var key = "useServer";
            Add(new OneVal(key, false, Crlf.Nextline,new CtrlCheckBox(Lang.Value(key))));

            var pageList = new List<OnePage>();
            key = "Basic";
            pageList.Add(Page1(key, Lang.Value(key), kernel));
            key = "ESMTP";
            pageList.Add(Page2(key, Lang.Value(key), kernel));
            key = "Relay";
            pageList.Add(Page3(key, Lang.Value(key), kernel));
            key = "Queue";
            pageList.Add(Page4(key, Lang.Value(key), kernel));
            key = "Host";
            pageList.Add(Page5(key, Lang.Value(key), kernel));
            key = "Heda";
            pageList.Add(Page6(key, Lang.Value(key), kernel));
            key = "Aliases";
            pageList.Add(Page7(key, Lang.Value(key), kernel));
            key = "AutoReception";
            pageList.Add(Page8(key, Lang.Value(key), kernel));
            pageList.Add(PageAcl());
            Add(new OneVal("tab", null, Crlf.Nextline, new CtrlTabPage("tabPage", pageList)));

            Read(kernel.IniDb); // レジストリからの読み込み
        }
Ejemplo n.º 3
0
        public Dlg(Kernel kernel, string nameTag, Object obj, string caption)
            : base(kernel, nameTag, obj, caption)
        {
            //リストビューの作成
            _listView = new ListView{
                Dock = DockStyle.Fill,
                FullRowSelect = true,
                HideSelection = false,
                View = System.Windows.Forms.View.Details
            };
            _listView.Columns.Add("Status");
            _listView.Columns.Add("Ip");
            _listView.Columns.Add("MacAppointment");
            _listView.Columns.Add("Mac");
            _listView.Columns.Add("Date");
            _listView.Columns[0].Width = 120;
            _listView.Columns[1].Width = 120;
            _listView.Columns[2].Width = 100;
            _listView.Columns[3].Width = 250;
            _listView.Columns[4].Width = 350;
            //メインコントロールの追加
            AddControl(_listView);

            ToolStripMenuItem menuFile = AddMenu(null, null, kernel.IsJp() ? "ファイル(&F)" : "&File", Keys.None);
            Add2(menuFile, FuncRefresh, kernel.IsJp() ? "最新の状態に更新する(&R)" : "&Refresh", Keys.F5);
            AddMenu(menuFile, null, "-", Keys.None);
            AddMenu(menuFile, FuncClose, kernel.IsJp() ? "閉じる(&C)" : "&Close", Keys.None);

            FuncRefresh();//最新の状態に更新する
        }
Ejemplo n.º 4
0
        public void SetUp()
        {
            const string mlName = "1ban";
            var domainList = new List<string>{ "example.com" };
            //var tsDir = new TsDir();
            var kernel = new Kernel();
            var logger = new Logger();
            var manageDir = TestUtil.GetTmpDir("TestDir");

            _tsMailSave = new TsMailSave();//MailSaveのモックオブジェクト

            var memberList = new Dat(new[] { CtrlType.TextBox, CtrlType.TextBox, CtrlType.CheckBox, CtrlType.CheckBox, CtrlType.CheckBox, CtrlType.TextBox });
            memberList.Add(true, string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}", "USER1", "*****@*****.**", false, true, true, "")); //一般・読者・投稿
            memberList.Add(true, string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}", "USER2", "*****@*****.**", false, true, false, ""));//一般・読者・×
            memberList.Add(true, string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}", "USER3", "*****@*****.**", false, false, true, ""));//一般・×・投稿
            memberList.Add(true, string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}", "ADMIN", "*****@*****.**", true, false, true, "123"));//管理者・×・投稿
            memberList.Add(true, string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}", "ADMIN2", "*****@*****.**", true, true, true, "456"));//管理者・読者・投稿
            var docs = (from object o in Enum.GetValues(typeof(MlDocKind)) select "").ToList();
            const int maxSummary = 10;
            const int getMax = 10;
            const bool autoRegistration = true;
            const int titleKind = 5;
            var mlOption = new MlOption(maxSummary, getMax, autoRegistration, titleKind, docs, manageDir, memberList);

            _ml = new Ml(kernel, logger, _tsMailSave, mlOption, mlName, domainList);
        }
Ejemplo n.º 5
0
 //通常のコンストラクタ
 public MlUsers(Kernel kernel, Logger logger, OneOption op)
 {
     this.kernel = kernel;
     this.logger = logger;
     this.op = op;
     Init((Dat)op.GetValue("memberList"));//初期化
 }
Ejemplo n.º 6
0
        public Dlg(Kernel kernel, string nameTag, Object obj, string caption)
            : base(kernel, nameTag, obj, caption)
        {
            //イメージリストの初期化
            _imageList.Images.Add(Resource.user);
            _imageList.Images.Add(Resource.mail);
            _imageList.Images.Add(Resource.queue);

            //ツリービューの作成
            _treeView = new TreeView();
            _treeView.Dock = DockStyle.Fill;
            _treeView.FullRowSelect = true;
            _treeView.HideSelection = false;
            _treeView.ImageList = _imageList;

            //メインコントロールの追加
            AddControl(_treeView);

            _treeView.DoubleClick += DlgDoubleClick;

            ToolStripMenuItem menuFile = AddMenu(null, null, kernel.IsJp() ? "ファイル(&F)" : "&File", Keys.None);
            Add2(menuFile, FuncRefresh, kernel.IsJp() ? "最新の状態に更新する(&R)" : "&Refuresh", Keys.F5);
            AddMenu(menuFile, null, "-", Keys.None);
            AddMenu(menuFile, FuncClose, kernel.IsJp() ? "閉じる(&C)" : "&Close", Keys.None);

            ToolStripMenuItem menuTool = AddMenu(null, null, kernel.IsJp() ? "ツール(&T)" : "&Tool", Keys.None);
            Add2(menuTool, FuncView, kernel.IsJp() ? "表示(&V)" : "&View", Keys.F1);
            Add2(menuTool, FuncDelete, kernel.IsJp() ? "削除(&D)" : "&Delete", Keys.Delete);

            //最新の状態に更新する
            FuncRefresh();
        }
Ejemplo n.º 7
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Udp, 53, 10, 30)); //サーバ基本設定

            var key = "rootCache";
            onePage.Add(new OneVal(key, "named.ca", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "useRD";
            onePage.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            var list = new ListVal();
            key = "soaMail";
            list.Add(new OneVal(key, "postmaster", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 30)));
            key = "soaSerial";
            list.Add(new OneVal(key, 1, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "soaRefresh";
            list.Add(new OneVal(key, 3600, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));
            key = "soaRetry";
            list.Add(new OneVal(key, 300, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "soaExpire";
            list.Add(new OneVal(key, 360000, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));
            key = "soaMinimum";
            list.Add(new OneVal(key, 3600, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "GroupSoa";
            onePage.Add(new OneVal(key, null, Crlf.Nextline, new CtrlGroup(Lang.Value(key), list)));

            return onePage;
        }
Ejemplo n.º 8
0
Archivo: Ml.cs Proyecto: jsakamoto/bjd5
        public Ml(Kernel kernel, Logger logger, MailSave mailSave, MlOption mlOption,string mlName,List<string>domainList)
        {
            Status = false;

            _kernel = kernel;
            _logger = logger;
            _mlName = mlName;
            //_mlOption = mlOption;

            _mlMailDb = new MlMailDb(logger, mlOption.ManageDir, mlName);
            if (!_mlMailDb.Status) {
                return;//初期化中断
            }

            _mlAddr = new MlAddr(mlName, domainList);
            _mlUserList = new MlUserList(mlOption.MemberList);
            _mlSender = new MlSender(mailSave, logger);
            var mlSubject = new MlSubject(mlOption.TitleKind, mlName);
            _mlDevivery = new MlDelivery(mailSave, logger,_mlUserList, _mlAddr, _mlMailDb, mlSubject, mlOption.Docs,mlOption.MaxGet);
            _mlCreator2 = new MlCreator(_mlAddr,mlOption.Docs);
            _autoRegistration = mlOption.AutoRegistration;
            const double effectiveMsec = 120 * 1000; //有効時間120秒
            _mlSubscribeDb = new MlSubscribeDb(mlOption.ManageDir, mlName, effectiveMsec);//confirm文字列データベース
            if (!_mlMailDb.Status) {
                return;//初期化中断
            }
            Status = true;//ステータス
        }
Ejemplo n.º 9
0
        public Cache(Kernel kernel, Logger logger, Conf conf)
            : base(logger)
        {
            this.logger = logger;
            //_oneOption = oneOption;
            _conf = conf;
            _useCache = (bool)conf.Get("useCache");

            if (!_useCache)
                return;

            _expires = (int)conf.Get("expires");
            _maxSize = (int)conf.Get("maxSize");
            _diskSize = (int)conf.Get("diskSize");
            _memorySize = (int)conf.Get("memorySize");

            //�L���b�V���Ώۃ��X�g
            _cacheTargetHost = new CacheTarget((Dat)conf.Get("cacheHost"), (int)conf.Get("enableHost"));
            _cacheTargetExt = new CacheTarget((Dat)conf.Get("cacheExt"), (int)conf.Get("enableExt"));

            //�f�B�X�N�L���b�V��
            var cacheDir = (string)conf.Get("cacheDir");//�L���b�V����ۑ�����f�B���N�g��
            if (cacheDir == "" || !Directory.Exists(cacheDir)) {
                logger.Set(LogKind.Error, null, 15, string.Format("dir = {0}", cacheDir));
                _diskSize = 0;
            }
            if (_diskSize != 0) {
                _diskCache = new DiskCache(cacheDir, logger);
            }

            if (_memorySize != 0)//�������L���b�V��
                _memoryCache = new MemoryCache(logger);
        }
Ejemplo n.º 10
0
        //サーバ側若しくはクライアント側どちらかのSockTcpは、Listen状態で生成が終わっている
        //そして、その接続の待ち受け開始は、このクラスの中で行われる
        //接続が完了した後、反対側のサーバ(Ip,port)へ、コネクトする
        public DataThread(Kernel kernel, Logger logger, int clientPort, int serverPort, Ip bindAddr, Ip ip, int port, int timeout)
        {
            _kernel = kernel;
            _logger = logger;

            _timeout = timeout;

            _ip = ip;
            _port = port;

            _sock[CS.Client] = null;
            _sock[CS.Server] = null;

            if (serverPort != 0) { //サーバ側がListen状態の場合 PASV
                _sock[CS.Server] = SockServer.CreateConnection(kernel,bindAddr,serverPort,null,this);
                if (_sock[CS.Server] == null)
                    return;
            } else if (clientPort != 0) { //クライアント側がListen状態の場合 PORT
                _sock[CS.Client] = SockServer.CreateConnection(kernel,bindAddr, clientPort, null,this);
                if (_sock[CS.Client] == null)
                    return;
            }
            //パイプスレッドの生成
            _t = new Thread(Pipe) {
                IsBackground = true
            };
            _t.Start();
        }
Ejemplo n.º 11
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Udp, 67, 10, 10)); //�T�[�o��{�ݒ�

            var key = "leaseTime";
            onePage.Add(new OneVal(key, 18000, Crlf.Nextline, new CtrlInt(Lang.Value(key), 8)));
            key = "startIp";
            onePage.Add(new OneVal(key, new Ip(IpKind.V4_0), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "endIp";
            onePage.Add(new OneVal(key, new Ip(IpKind.V4_0), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "maskIp";
            onePage.Add(new OneVal(key, new Ip("255.255.255.0"), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "gwIp";
            onePage.Add(new OneVal(key, new Ip(IpKind.V4_0), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "dnsIp0";
            onePage.Add(new OneVal(key, new Ip(IpKind.V4_0), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "dnsIp1";
            onePage.Add(new OneVal(key, new Ip(IpKind.V4_0), Crlf.Nextline, new CtrlAddress(Lang.Value(key))));
            key = "useWpad";
            onePage.Add(new OneVal(key, false, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
            onePage.Add(new OneVal("wpadUrl", "http://", Crlf.Nextline, new CtrlTextBox("URL", 37)));

            return onePage;
        }
Ejemplo n.º 12
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            //nameTag����|�[�g�ԍ���擾���Z�b�g����i�ύX�s�j
            var tmp = NameTag.Split(':');
            var protocolKind = ProtocolKind.Tcp;
            var port = 0;
            var targetServer = "";
            var targetPort = 0;
            if (tmp.Length == 4) {
                //�l������I�ɐݒ�
                protocolKind = (tmp[0] == "Tunnel-TCP") ? ProtocolKind.Tcp : ProtocolKind.Udp;
                port = Convert.ToInt32(tmp[1]);
                targetServer = tmp[2];
                targetPort = Convert.ToInt32(tmp[3]);
            }
            onePage.Add(CreateServerOption(protocolKind, port, 60, 10)); //�T�[�o��{�ݒ�

            var key = "targetPort";
            onePage.Add(new OneVal(key, targetPort, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "targetServer";
            onePage.Add(new OneVal(key, targetServer, Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "idleTime";
            onePage.Add(new OneVal(key, 1, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));

            return onePage;
        }
Ejemplo n.º 13
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);
            onePage.Add(CreateServerOption(ProtocolKind.Tcp, 25, 30, 10)); //サーバ基本設定

            var key = "domainName";
            onePage.Add(new OneVal(key, "example.com", Crlf.Nextline,new CtrlTextBox(Lang.Value(key), 50)));
            key = "bannerMessage";
            onePage.Add(new OneVal(key, "$s SMTP $p $v; $d", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "receivedHeader";
            onePage.Add(new OneVal(key, "from $h ([$a]) by $s with SMTP id $i for <$t>; $d", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "sizeLimit";
            onePage.Add(new OneVal(key, 5000, Crlf.Nextline, new CtrlInt(Lang.Value(key), 8)));
            key = "errorFrom";
            onePage.Add(new OneVal(key, "root@local", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 50)));
            key = "useNullFrom";
            onePage.Add(new OneVal(key, false, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
            key = "useNullDomain";
            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
            key = "usePopBeforeSmtp";
            onePage.Add(new OneVal(key, false, Crlf.Contonie, new CtrlCheckBox(Lang.Value(key))));
            key = "timePopBeforeSmtp";
            onePage.Add(new OneVal(key, 10, Crlf.Nextline, new CtrlInt(Lang.Value(key), 5)));
            key = "useCheckFrom";
            onePage.Add(new OneVal(key, false, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));

            return onePage;
        }
Ejemplo n.º 14
0
        WebDavDb _webDavDb; //WevDAVのDethプロパテイを管理するクラス

        #endregion Fields

        #region Constructors

        //通常のServerThreadの子クラスと違い、オプションはリストで受け取る
        //親クラスは、そのリストの0番目のオブジェクトで初期化する
        //コンストラクタ
        public Server(Kernel kernel,Conf conf,OneBind oneBind)
            : base(kernel, conf,oneBind)
        {
            //同一ポートで待ち受けている仮想サーバのオプションをすべてリストする
            WebOptionList = new List<OneOption>();
            foreach (var o in kernel.ListOption) {
                if (o.NameTag.IndexOf("Web-") == 0) {
                    if((int)o.GetValue("port") == (int)Conf.Get("port")){
                        WebOptionList.Add(o);
                    }
                }
            }
            //WebDAVリストの初期化
            foreach (var o in WebOptionList) {
                if(o.UseServer) {
                    _webDavDbList.Add(new WebDavDb(kernel,NameTag));
                }
            }
            _webDavDb = _webDavDbList[0];

            //Ver5.1.2「Cgiパス」「WebDAVパス」「別名」のオプションの修正
            var tagList = new List<string> { "cgiPath", "webDavPath", "aliaseList" };
            foreach(string tag in tagList) {
                var dat = (Dat)Conf.Get(tag);
                var changed = false;
                foreach(var o in dat) {
                    var str = o.StrList[0];
                    if(str[0] != '/') {
                        changed = true;
                        str = '/' + str;
                    }
                    if(str.Length > 1 && str[str.Length - 1] != '/') {
                        changed = true;
                        str = str + '/';
                    }
                    o.StrList[0] = str;
                }
                if(changed)
                    Conf.Set(tag, dat);
            }

            //当初、opBase及びloggerは、weboptionList[0]で暫定的に初期化される
            var protocol = (int)Conf.Get("protocol");
            if (protocol==1) {//HTTPS
                var op = kernel.ListOption.Get("VirtualHost");
                var privateKeyPassword = (string)op.GetValue("privateKeyPassword");
                var certificate = (string)op.GetValue("certificate");

                //サーバ用SSLの初期化
                ssl = new Ssl(Logger, certificate, privateKeyPassword);
            }

            var useAutoAcl = (bool)Conf.Get("useAutoAcl");// ACL拒否リストへ自動追加する
            if (useAutoAcl) {
                const int max = 1; //発生回数
                const int sec = 120; // 対象期間(秒)
                _attackDb = new AttackDb(sec, max);
            }
        }
Ejemplo n.º 15
0
 public TsMlDb(Kernel kernel, string tmpDir)
     : base(kernel, null, tmpDir)
 {
     this.tmpDir = tmpDir;
     for (int i = 0; i < 300; i++) {
         Clear(i);
     }
 }
Ejemplo n.º 16
0
 public void SetUp()
 {
     //設定ファイルの退避と上書き
     _op = new TmpOption("BJDTest","MailBoxTest.ini");
     var kernel = new Kernel();
     var oneOption = new OptionMailBox(kernel,"");
     _conf = new Conf(oneOption);
 }
Ejemplo n.º 17
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Tcp, 5050, 30, 10)); //サーバ基本設定

            return onePage;
        }
Ejemplo n.º 18
0
        public PasswordDlg(Kernel kernel)
        {
            InitializeComponent();
            _kernel = kernel;

            label1.Text = (kernel.IsJp()) ? "�p�X���[�h����͂��Ă�������" : "Login password";
            buttonCancel.Text = (kernel.IsJp()) ? "�L�����Z��" : "Cancel";
        }
Ejemplo n.º 19
0
        DateTime _dt = new DateTime(0); //最終処理時間

        #endregion Fields

        #region Constructors

        public OneFetchJob(Kernel kernel, MailSave mailSave,String domainName,OneFetch oneFetch, int timeout, int sizeLimit)
        {
            _kernel = kernel;
            _mailSave = mailSave;
            _domainName = domainName;
            _oneFetch = oneFetch;
            _timeout = timeout;
            _sizeLimit = sizeLimit;
        }
Ejemplo n.º 20
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Tcp, 10001, 60, 1)); //�T�[�o��{�ݒ�
            var key = "password";
            onePage.Add(new OneVal(key, "", Crlf.Nextline, new CtrlHidden(Lang.Value(key), 20)));
            return onePage;
        }
Ejemplo n.º 21
0
 public Server(Kernel kernel, Conf conf, OneBind oneBind)
     : base(kernel, conf, oneBind)
 {
     _bannerMessage = kernel.ChangeTag((String) Conf.Get("bannerMessage"));
     //���[�U���
     _listUser = new ListUser((Dat) Conf.Get("user"));
     //���z�t�H���_
     _listMount = new ListMount((Dat) Conf.Get("mountList"));
 }
Ejemplo n.º 22
0
        public OptionMl(Kernel kernel, string path, string nameTag)
            : base(kernel.IsJp(), path, nameTag)
        {
            var pageList = new List<OnePage>();
            var key = "Mailing List";
            pageList.Add(Page1(key, Lang.Value(key), kernel));
            Add(new OneVal("tab", null, Crlf.Nextline, new CtrlTabPage("tabPage", pageList)));

            Read(kernel.IniDb); // レジストリからの読み込み
        }
Ejemplo n.º 23
0
        public OptionDnsDomain(Kernel kernel, string path, string nameTag)
            : base(kernel.IsJp(), path, nameTag)
        {
            var pageList = new List<OnePage>();
            var key = "Basic";
            pageList.Add(Page1(key,Lang.Value(key),kernel));
            Add(new OneVal("tab", null, Crlf.Nextline, new CtrlTabPage("tabPage", pageList)));

            Read(kernel.IniDb); //�@���W�X�g������̓ǂݍ���
        }
Ejemplo n.º 24
0
        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;//デフォルトで継続型
        }
Ejemplo n.º 25
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Tcp, 5060, 30, 30)); //サーバ基本設定
            var key = "sampleText";
            onePage.Add(new OneVal(key, "Sample Server : ", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 60)));

            return onePage;
        }
Ejemplo n.º 26
0
        public PopClient(Kernel kernel,Ip ip,int port,int sec,ILife iLife)
        {
            _kernel = kernel;
            _ip = ip;
            _port = port;
            _sec = sec;
            _iLife = iLife;

            Status = PopClientStatus.Idle;
        }
Ejemplo n.º 27
0
        public void SetUp()
        {
            //設定ファイルの退避と上書き
            _op = new TmpOption("WebServerTest","WebServerTest.ini");
            Kernel kernel = new Kernel();
            var option = kernel.ListOption.Get("Web-localhost:88");
            Conf conf = new Conf(option);

            _contentType = new ContentType(conf);
        }
Ejemplo n.º 28
0
        private OnePage Page1(string name, string title, Kernel kernel)
        {
            var onePage = new OnePage(name, title);

            onePage.Add(CreateServerOption(ProtocolKind.Tcp, 8023, 60, 10)); //�T�[�o��{�ݒ�

            var key = "idleTime";
            onePage.Add(new OneVal(key, 1, Crlf.Contonie, new CtrlInt(Lang.Value(key), 5)));

            return onePage;
        }
Ejemplo n.º 29
0
 private OnePage Page1(string name, string title,Kernel kernel)
 {
     var onePage = new OnePage(name, title);
     var list = new ListVal();
     var key = "name";
     list.Add(new OneVal(key, "", Crlf.Nextline, new CtrlTextBox(Lang.Value(key), 80)));
     key = "authority";
     list.Add(new OneVal(key, true, Crlf.Nextline, new CtrlCheckBox(Lang.Value(key))));
     onePage.Add(new OneVal("domainList", null, Crlf.Nextline, new CtrlDat("", list, 400, Lang.LangKind)));
     return onePage;
 }
Ejemplo n.º 30
0
 public void SetUp()
 {
     var kernel = new Kernel();
     var ip = new Ip("127.0.0.1");
     const int port = 0;
     Ssl ssl = null;
     var tcpObj = new SockTcp(new Kernel(), ip,port,3,ssl);
     var upperProxy = new UpperProxy(false, "", 0, null,false,"","");//上位プロキシ未使用
     const int timeout = 3;
     _proxy = new Proxy(kernel, null, tcpObj, timeout,upperProxy);
 }