自建一个推送服务-Bark。

1.服务端

docker运行

docker run -dt --name bark -p 10100:8080 -v /opt/docker_dir/bark:/data finab/bark-server

nginx配置

server {
    listen  443 ssl;
    server_name  bark.foo.bar;

    ssl on; #开启ssl
    ssl_certificate path/to/pem; #pem证书路径
    ssl_certificate_key     path/to/key; #pem证书key路径
    ssl_session_timeout     5m; #会话超时时间
    ssl_ciphers     ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #加密算法
    ssl_protocols   TLSv1 TLSv1.1 TLSv1.2; #SSL协议

    # pass requests for dynamic content to rails/turbogears/zope, et al
    location / {
        log_not_found on;
        proxy_pass http://127.0.0.1:10100;
        proxy_read_timeout 300;
        proxy_connect_timeout 300;
        proxy_redirect off;
        proxy_set_header Host              $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP         $remote_addr;
    }
}

2.客户端

app store直接下载,https://apps.apple.com/us/app/bark-customed-notifications/id1403753865

3.使用

3.1内容

https://api.day.app/yourkey/内容

3.2标题+内容

https://api.day.app/yourkey/标题/内容

3.3copy

3.3.1收到推送时,推送内容会自动复制到粘贴板

https://api.day.app/yourkey/验证码是9527?automaticallyCopy=1

3.3.2自动复制 “9527” 到粘贴板

https://api.day.app/yourkey/验证码是9527?automaticallyCopy=1&copy=9527

4.参考资料