|
2 months ago | |
---|---|---|
api/v1 | 2 months ago | |
src | 3 months ago | |
.gitignore | 3 months ago | |
.licenseignore | 3 months ago | |
.prettierignore | 3 months ago | |
.prettierrc.yaml | 3 months ago | |
Dockerfile | 3 months ago | |
LICENSE | 3 months ago | |
LICENSE.HEADER | 3 months ago | |
README.md | 3 months ago | |
license-checker-config.json | 3 months ago | |
package.json | 3 months ago | |
yarn.lock | 2 months ago |
This is a proxy server written in Node.js for the doip.js library.
When doip.js is ran in a Node.js environment, it can function completely autonomously. When ran in a browser, some proofs can't be verified due to CORS restrictions or lack of Node.js tools like DNS resolvers. In these cases, the requests will need to be routed to a proxy server running this project.
Currently, doip-proxy handles:
Please note that XMPP functionality is disabled by default. Information on how to enable is found below.
git clone git@codeberg.org:keyoxide/doip-proxy.git
yarn --production
yarn start
Doip-proxy is now available at http://localhost:3000
git clone git@codeberg.org:keyoxide/doip-proxy.git
docker build -t doip-proxy .
docker container run -p 3000:3000 doip-proxy
Doip-proxy is now available at http://localhost:3000.
/api/1/get/json/:url
The url
needs to be encoded (in js: encodeURIComponent(url)
).
/api/1/get/txt/:url
The url
needs to be encoded (in js: encodeURIComponent(url)
).
/api/1/get/dns/:hostname
hostname
means just the domain without https://
.
/api/1/get/xmpp/:xmppid/:xmppdata
xmppid
is also known as jabberid
and looks like an email address:
user@domain.org
.
xmppdata
is the specific vCard entry that you are requesting. For DOIP proof
verification, you will need DESC
. Possible values are:
FN, NUMBER, USERID, URL, BDAY, NICKNAME, DESC
.
Enabling XMPP functionality requires an XMPP account. Please note that after some testing, it turns out not all XMPP instances work equally well with doip-proxy. If XMPP continues to fail, please try a different XMPP instances.
XMPP account credentials are passed to the library using environment variables.
For example, with docker:
docker container run -p 3000:3000 -e XMPP_SERVICE=domain.org -e XMPP_USERNAME=username -e XMPP_PASSWORD=password doip-proxy
Todo: