Changeset 376

Show
Ignore:
Timestamp:
05/07/08 22:03:43 (7 months ago)
Author:
tomoyo
Message:

とりあえずCLI版でプロクシに対応してみた。

Location:
TwitterIrcGateway
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • TwitterIrcGateway/TwitterIrcGatewayCLI/Program.cs

    r369 r376  
    6060            _server.BroadcastUpdateMessageIsNotice = options.BroadcastUpdateMessageIsNotice; 
    6161            _server.SessionStartedRecieved += new EventHandler<SessionStartedEventArgs>(_server_SessionStartedRecieved); 
     62            _server.Proxy = new WebProxy(options.Proxy); 
    6263 
    6364            Console.WriteLine("Start TwitterIrcGateway Server v{0}", typeof(Server).Assembly.GetName().Version); 
     
    7980            Console.WriteLine("[Configuration] ClientMessageWait: {0}", _server.ClientMessageWait); 
    8081            Console.WriteLine("[Configuration] BroadcatUpdateMessageIsNotice: {0}", _server.BroadcastUpdateMessageIsNotice); 
     82            Console.WriteLine("[Configuration] Proxy: {0}", _server.Proxy); 
    8183 
    8284            _server.Start(bindAddress, options.Port); 
     
    172174        [Description("broadcast status message type is NOTICE")] 
    173175        public Boolean BroadcastUpdateMessageIsNotice { get; set; } 
     176 
     177        [DefaultValue("")] 
     178        [Description("web proxy url")] 
     179        public String Proxy { get; set; } 
    174180    } 
    175181} 
  • TwitterIrcGateway/TwitterIrcGatewayCore/Server.cs

    r369 r376  
    8989        public Boolean BroadcastUpdateMessageIsNotice = false; 
    9090 
     91        /// <summary> 
     92        /// API�A�N�Z�X�ɗ��p�������N�V�T�[�o�̐ݒ�        /// </summary> 
     93        public IWebProxy Proxy = null; 
     94 
    9195        public const String ServerName = "localhost"; 
    9296        public const String ServerNick = "$TwitterIrcGatewayServer$"; 
  • TwitterIrcGateway/TwitterIrcGatewayCore/Session.cs

    r375 r376  
    606606            _twitter = new TwitterService(_username, _password); 
    607607            _twitter.CookieLoginMode = _server.CookieLoginMode; 
     608            if (_server.Proxy != null) 
     609                _twitter.Proxy = _server.Proxy; 
    608610 
    609611            Type t = typeof(Server); 
  • TwitterIrcGateway/TwitterIrcGatewayCore/TwitterService.cs

    r362 r376  
    4141        } 
    4242 
     43        /// <summary> 
     44        /// �ڑ��ɗ��p�������L�V��肵�܂��B 
     45        /// </summary> 
     46        public IWebProxy Proxy 
     47        { 
     48            get 
     49            { 
     50                return _webClient.Proxy; 
     51            } 
     52            set 
     53            { 
     54                _webClient.Proxy = value; 
     55            } 
     56        } 
     57         
    4358        /// <summary> 
    4459        /// Cookie�𗘗p���ă��O�C�����ăf�[�^�ɃA�N�Z�X���܂��B