Exemplo n.º 1
0
 public SocksClient(
     Socket localSocket, 
     SubscribeHandler subscribe, 
     SelfDestructHandler selfDestruct, 
     AuthCallbackHandler authCallback)
     : base(localSocket, subscribe, selfDestruct)
 {
     _authCallback = authCallback;
 }
Exemplo n.º 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, ITableStorageRepo tableStore)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            //I am not a fan of this, but I want it done in startup, before and end-user-developer code.
            tableStore.Init().GetAwaiter().GetResult();

            app.UseApplicationInsightsRequestTelemetry();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseApplicationInsightsExceptionTelemetry();

            app.UseStaticFiles();

            app.UseCookieAuthentication(new CookieAuthenticationOptions());

            _callbackHandler = new AuthCallbackHandler();

            app.UseDxAuth(serviceProvider, Configuration, _callbackHandler);

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });

            // Enable middleware to serve generated Swagger as a JSON endpoint
            app.UseSwagger();

            // Enable middleware to serve swagger-ui assets (HTML, JS, CSS etc.)
            app.UseSwaggerUi();
        }
Exemplo n.º 3
0
 public AuthUserPass(AuthCallbackHandler callback)
 {
     _callback = callback;
 }
Exemplo n.º 4
0
 public SocksServer(IPAddress ip, int port, AuthCallbackHandler callback)
     : base(ip, port)
 {
     AuthCallback = callback;
 }
Exemplo n.º 5
0
 public SocksServer(int port, AuthCallbackHandler callback)
     : this(IPAddress.Any, port, callback)
 {
 }
Exemplo n.º 6
0
 public SocksServer(IPAddress ip, int port, AuthCallbackHandler callback)
     : base(ip, port)
 {
     AuthCallback = callback;
 }
Exemplo n.º 7
0
 public SocksServer(int port, AuthCallbackHandler callback)
     : this(IPAddress.Any, port, callback)
 {}
Exemplo n.º 8
0
 public Socks5Handler(Socket localSocket, HandshakeCallback callback, AuthCallbackHandler authCallback)
     : base(localSocket, callback)
 {
     _authCallback = authCallback;
 }
Exemplo n.º 9
0
 public AuthUserPass(AuthCallbackHandler callback)
 {
     _callback = callback;
 }
Exemplo n.º 10
0
 public Socks5Handler(Socket localSocket, HandshakeCallback callback, AuthCallbackHandler authCallback)
     : base(localSocket, callback)
 {
     _authCallback = authCallback;
 }