cmliu / cf-workers-text2kv Goto Github PK
View Code? Open in Web Editor NEW这个是一个通过 Cloudflare Workers 搭建,将文本文件存储到 Cloudflare Workers KV 键值存储中,并且可以通过 URL 请求读取或更新这些文本文件。
License: GNU General Public License v3.0
这个是一个通过 Cloudflare Workers 搭建,将文本文件存储到 Cloudflare Workers KV 键值存储中,并且可以通过 URL 请求读取或更新这些文本文件。
License: GNU General Public License v3.0
目前脚本在 mac
Sonoma 14.1
环境下运行 ./update.sh ip.txt
后,提示base64: 0: No such file or directory
。
正确脚本应该是
#!/bin/bash
export LANG=zh_CN.UTF-8
DOMAIN="${域名}"
TOKEN="${token}"
if [ -n "$1" ]; then
FILENAME="$1"
else
echo "无文件名"
exit 1
fi
BASE64_TEXT=$(head -n 65 $FILENAME | base64)
curl -k "https://$DOMAIN/$FILENAME?token=$TOKEN&b64=$BASE64_TEXT"
echo "更新数据完成"
./update.sh result.csv
./update.sh ip.txt
都不行
我用的Macos
如题,是不是可以加个时间戳
用的最新的https://github.com/cmliu/WorkerVless2sub这个项目里的代码,应该就是这个环境变量的区别
也试过把文件的文件名改过从yxip.txt改成ip.txt也没用
烦请大佬检查
Workers环境部署,TOKEN变量的值,未起作用
部署完成点击网址跳转出现‘Welcome to nginx’,加上token访问出现400 Bad Request,请问大概如何去排查问题?谢谢。
因为将update.sh脚本运行于Padavan的老毛子固件上,base64的参数不适用,建议做如下更新,以扩展其运行的普适性。
第11行
BASE64_TEXT=$(head -n 65 "$FILENAME" | base64 | tr -d '\n')
第12行,鉴于某些地区的网络条件,增加重复次数确保成功率
curl -kv "https://$DOMAIN/$FILENAME?token=$TOKEN&b64=$BASE64_TEXT" --connect-timeout 3 --max-time 3 --retry 3 --retry-delay 5
需要改为
BASE64_TEXT=$(head -n 65 $FILENAME | base64 -w 0)
是否可以使用post方式上传,这样文件大小就不会限制的这么死
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.