{"id":13466993,"url":"https://github.com/longforus/api-debugger","last_synced_at":"2025-04-09T19:22:19.666Z","repository":{"id":130519619,"uuid":"146678560","full_name":"longforus/api-debugger","owner":"longforus","description":"🔨A like Postman API debugger that supports custom encryption. 一个类似Postman的支持自定义加密传输的后台API接口调试工具.","archived":false,"fork":false,"pushed_at":"2018-11-13T07:13:53.000Z","size":44125,"stargazers_count":67,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T21:11:50.196Z","etag":null,"topics":["android-development","api-debugger","kotlin","mobile-development","objectbox","okhttp3","postman","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/longforus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-30T01:21:58.000Z","updated_at":"2023-07-04T01:10:31.000Z","dependencies_parsed_at":"2024-01-16T06:09:02.422Z","dependency_job_id":"f0d9e92f-49a7-409e-bce2-01cc65f2dee3","html_url":"https://github.com/longforus/api-debugger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longforus%2Fapi-debugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longforus%2Fapi-debugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longforus%2Fapi-debugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longforus%2Fapi-debugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longforus","download_url":"https://codeload.github.com/longforus/api-debugger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248095514,"owners_count":21046861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-development","api-debugger","kotlin","mobile-development","objectbox","okhttp3","postman","swing"],"created_at":"2024-07-31T15:00:52.073Z","updated_at":"2025-04-09T19:22:19.636Z","avatar_url":"https://github.com/longforus.png","language":"Java","readme":"# API debugger\n\nA like Postman API debugger that supports custom encryption.\n\n一个类似Postman的支持自定义加密传输的后台API接口调试工具.\n\n![1](./img/1.png)\n\n## 特征\n\n-   支持可扩展的自定义的参数加密方式.\n-   使用数据库按项目分开保存BaseUrl和接口Api列表,一次配置,持续使用.\n-   支持多个BaseUrl点击切换.请求参数动态增删.\n-   支持默认请求参数配置,该项目下的每一个接口请求都会默认添加默认请求参数.\n-   使用[Json Editor Online](http://jsoneditoronline.org/)展示请求结果json,美观,易用.\n-   支持简单的接口压力测试\n\n## 安装\n\n点击[下载最新release包](https://github.com/longforus/api-debugger/releases).在安装了JDK1.8或者JRE1.8的电脑上,双击jar包直接运行.\n\n-   JDK下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html\n-   如果在Windows系统下无法正常使用的话.需要安装 [Microsoft Visual C++ 2015 Redistributable (x64)](http://www.microsoft.com/en-us/download/details.aspx?id=53587)\n\n## 使用\n\n1.  创建项目:菜单栏 \u003ckbd\u003eProject\u003c/kbd\u003e \u003e \u003ckbd\u003enew\u003c/kbd\u003e\u003e \u003ckbd\u003e输入项目名称\u003c/kbd\u003e\u003e\u003ckbd\u003eOK\u003c/kbd\u003e\n\n    ![2](/img/2.png)\n\n     看到当前打开的项目就OK了.\n\n2.  输入BaseUrl,点击保存生效.\n\n3.  输入接口Url,最后的请求Url = baseUrl+接口Url.\n\n4.  选择请求方法,现在只做了POST和GET方法.\n\n5.  选择加密方式.default是没有加密,直接发送.\n\n6.  Add Row 添加一个请求参数.\n\n7.  填写请求参数的key和value,这里需要注意的是需要表格失去焦点变为蓝色之后,这个值才会被保存生效.\n\n    ![3](/img/3.png)\n\n8.  点击小飞机发送请求.请求的相关信息在右上部分的Request Information中显示.请求结果在下面的Json Editor中显示.\n\n9.  请求成功返回后这个接口的url,方法,加密方式和请求参数会自动保存到数据库中.添加其他请求只需直接输入接口url和参数,方法等配置进行测试,前一个接口的信息不会被覆盖.\n\n## 自定义加密扩展\n\n该App界面使用Java实现,逻辑使用Kotlin实现.内部数据库为[ObjectBox](https://objectbox.io/),网络请求使用Okhttp3.需要达到自定义加密的目的的话.需要自行扩展.\n\n1. **[重点]**fork仓库clone到本地后,使用IDEA打开.下载 jxbrowser-对应平台-6.20.jar (链接：https://pan.baidu.com/s/1B3ErPhbrocIaGhu3zg8RMA 密码：1wn9 )  拷贝到lib中(太大了不好传).\n\n2. 在build生成out文件夹后,解压jsonView.zip到`\\out\\production\\classes\\com\\longforus\\apidebugger\\ui`目录下(这样生成jar包的时候才会把这些文件包含到jar包中,gradle应该有别的更优雅的方法,目前尚未实现).\n\n3. 实现`com.longforus.apidebugger.encrypt.IEncryptHandler`抽象类.可参考默认实现类`com.longforus.apidebugger.encrypt.DefaultEncryptHandler`\n\n    ```kotlin\n    /**\n     * Created by XQ Yang on 8/30/2018  5:11 PM.\n     * Description : 加密处理\n     */\n    abstract class IEncryptHandler {\n        //这个加密类型的code,同一工程不允许出现相同的\n        abstract val typeCode:Int\n        //显示在界面上的名字\n        abstract val title: String\n        //实现get方法的参数加密\n        abstract fun onGetMethodEncrypt(params: Map\u003cString, String\u003e?, builder: Request.Builder, url: String)\n        //实现post方法的参数加密\n        abstract fun onPostMethodEncrypt(params: Map\u003cString, String\u003e?, builder: Request.Builder, url: String): RequestBody\n        override fun toString(): String {\n            return title\n        }\n    }\n    ```\n\n4. 新建一个实现类的实例添加到`com.longforus.apidebugger.MyValueHandler#getEncryptImplList`中.第0个为默认显示item.现在就可以在加密方式中选择你自己的加密方式了.\n\n    ```kotlin\n    \n    object MyValueHandler {\n        val encryptImplList = listOf\u003cIEncryptHandler\u003e(YourEncryptHandler(), DefaultEncryptHandler())\n       }\n    ```\n\n5. 打包可运行的jar包:\n\n    ![4](/img/4.png)\n\n    ![5](/img/5.png)\n\n    ![6](/img/6.png)\n\n    ![7](/img/7.png)\n\n6.  添加splash闪屏图片:\n      拷贝splash.png到`\\out\\production\\classes`目录下,在上一步生成的清单文件中添加最后一行.\n    ```\n       Manifest-Version: 1.0\n       Main-Class: com.longforus.apidebugger.MainKt\n       SplashScreen-Image: splash.png\n    ```","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongforus%2Fapi-debugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongforus%2Fapi-debugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongforus%2Fapi-debugger/lists"}