Giter VIP home page Giter VIP logo

remotedebug's Introduction

本项目最主要的是两个方法:

  • IServiceCollection的拓展方法ListeningRemoteDebug
  • IApplicationBuilder的拓展方法OpenRemoteDebug

用法:

在远程(部署)环境中使用,该环境扮演着参数转发者的角色

  • 在Startup.cs的Configure方法中调用OpenRemoteDebug打开远程调试,需要的参数如下
   app.OpenRemoteDebug(setting =>
           {
               setting.SecretKey = "1234";
               setting.IgnoredEndpoint = new System.Collections.Generic.List<string>
               {
                     "/index.html",
                     "/swagger/v1/swagger.json",
                     "/favicon.ico"
               };
           });

参数说明

  • SecretKey是指定连接者需要提供的密钥,这是一个安全措施,避免谁都能连接
  • IgnoredEndpoint 是指定需要过滤的路由,并不是所有请求进来之后都需要转发的,这里可以做一个过滤的配置

在本地(开发)环境中使用,该环境扮演者参数接收者的角色

  • 在Startup.cs的ConfigureServices方法中调用ListeningRemoteDebug监听远程环境接收到的请求,需要的参数如下:
     services.ListeningRemoteDebug(listeningSetting =>
            {
                listeningSetting.LocalUrl = "http://localhost:5001";
                listeningSetting.RemoteUrl = "http://www.baidu.com";
                listeningSetting.SecretKey = "1234";
            });

参数说明

  • LocalUrl本地环境的地址
  • RemoteUrl远程环境的地址
  • SecretKey远程环境需要提供的密钥

remotedebug's People

Contributors

huangkemeng avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.