• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

peer-base/peer-base-pinner: A pinner for peer-base ... backup collaborations usi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

peer-base/peer-base-pinner

开源软件地址:

https://github.com/peer-base/peer-base-pinner

开源编程语言:

JavaScript 99.6%

开源软件介绍:

peer-base-pinner

A pinner for peer-base ... backup collaborations using IPFS, IPLD, IPNS + ipfs-cluster

Initial Setup

$ IPFS_HOME=/tmp/peer-base-pinner ipfs init
$ cat << EOF > .env
# Expose a websocket proxy (optional)
WEBSOCKET_ANNOUNCE_HOST=peer-base-pinner.example.com
WEBSOCKET_EXTERNAL_PORT=8080
## Starts a proxy and announces it as /dns4/<host>/tcp/<port>/ws/ipfs/<backplane-peer-id>
##
## If running on a platform such as Heroku that requires a 'Host' header in
## order to route to the correct app, and because it is not currently possible
## to embed 'Host' headers in multiaddrs, it maybe be necessary to manually
## proxy through an additional layer (such as nginx) in order to add the
## 'Host header. See: https://github.com/multiformats/multiaddr/issues/63
## An example nginx config is shown below.

# The IPFS cluster
BOOTSTRAP1=/dns4/example.com/tcp/9097/ipfs/QmXXX

# Set STARTUP_MODE to init on first run, then load-from-pinner
STARTUP_MODE=init

# ipfs-cluster stuff
IPFS_CLUSTER_API=/dns4/example.com/tcp/9097/ipfs/QmXXX
IPFS_CLUSTER_LABEL=some-label
IPFS_CLUSTER_USER=jimpick
IPFS_CLUSTER_PASSWORD=iloveipfs

# Create a new Peer Id and private key (from /tmp/peer-base-pinner/config)
PEER_ID=QmYYY
PRIV_KEY=ZZZZZZZZZ....=
EOF
$ heroku maintenance:on
$ heroku plugins:install heroku-config
$ heroku config:push
$ heroku maintenance:off
# wait for it to start up
$ heroku config:set IPNS_MODE=load

Example nginx websocket proxy to add Host header

server {
    listen 8080;
    server_name peer-pad-pinner.example.com;
    location / {
        proxy_pass http://peer-pad-pinner.herokuapp.com:80;
        proxy_cache_bypass $http_upgrade;
        proxy_http_version 1.1;
        proxy_set_header Host "peer-pad-pinner.herokuapp.com:80";
        proxy_set_header Origin "http://peer-pad-pinner.herokuapp.com:80";
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
     }
}



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
crypony/goongo: Go game on IPFS发布时间:2022-06-22
下一篇:
icidasset/diffuse: A music player that connects to your cloud/distributed storag ...发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap