博文

目前显示的是标签为“api”的博文

Linux 命令行 curl 用POST方法 调用图床系统 API 添加二进制文件

图片
之前, 我们利用pastebin系统实现了用API添加文本文件. 如果我们想保存二进制文件, 要怎么办呢? 这里, 我们利用图床系统imghost.

Linux 命令行 curl 用POST方法 调用pastebin系统 API 添加文本文件

图片
我们已经有了 利用免费worker搭建的短链系统 , 通过 配置参数设置为网络记事本 Pastebin , 用于保存自己的翻墙节点订阅信息, 或者是clash的配置文件. 在某些场景下, 你在Linux环境下已经有了订阅信息的文件(或者clash的配置文件), 不想搞什么复制粘贴, 鼠标点点点, 就想命令行直接一键上传到短链系统(网络记事本 Pastebin)中. 那么, 可以使用 curl 命令, 用POST方法 调用短链系统的 API

调试 Url-Shorten-Worker API报错 from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

图片
问题  想调试 Url-Shorten-Worker, 把 index.html 保存在本地电脑上, 调用服务器https://1way.eu.org/的API, 报错 Access to fetch at 'https://1way.eu.org/bodongshouqulveweifengci' from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

GitHub Proxy 支持 api.github.com

图片
在使用GitHub Proxy代理 warp 脚本时,发现在调用api.github.com时报错。 经查, gh-proxy 没有加入对api.github.com的支持 https://github.com/hunshcn/gh-proxy/issues/44 那么就自己加一下吧。 修改内容很简单,前面部分,过滤格式增加一行 const exp7 = /^(?:https?:\/\/)?api\.github\.com\/.+?\/.+?\/.*$/i 后面部分,判断格式的地方加一个 || path.search(exp7) === 0  ====== 完 Github:  https://github.com/crazypeace/gh-proxy ====== 实例 bash <(curl  https://github.crazypeace.workers.dev/ https://raw.githubusercontent.com/P3TERX/warp.sh/main/warp.sh   | perl -pe "$(curl -L  https://github.crazypeace.workers.dev/ https://github.com/crazypeace/gh-proxy/raw/master/perl-pe-para )" ) 4

The Hot3 in Last 30 Days

无服务器 自建短链服务 Url-Shorten-Worker 完整的部署教程

ClouDNS .asia免费域名 托管到CloudFlare开CDN白嫖Websocket WS通道翻墙 / desec.io