Skip to content

Service to share passwords, secret notes securely

License

Notifications You must be signed in to change notification settings

Ajnasz/sekret.link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sekret.link

Service to share notes, passwords securely.

Build

go get
go build .

Start

./sekret.link [option]...

Options

webExternalURL when using a reverse proxy to pass requests to sekret.link and you prefix the path with something, this sould be set to the same prefix, eg.: https://sekret.link/api postgresDB mongodb connection string expireSeconds default expire time, while a secret is walid maxExpireSeconds the longest time a secret can be stored maxDataSize maximum size of secret in bytes version print the version

Postgres URL can be set from env var:

POSTGRES_URL="user=sekret_link password=password host=localhost dbname=sekret_link sslmode=disable"

Example usage

Start the server

docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=password -e POSTGRES_DB=sekret_link_test -d postgres:13-alpine
# in cmd/sekret.link folder
POSTGRES_URL="postgres://postgres:password@localhost:5432/sekret_link_test?sslmode=disable" go run . -webExternalURL=/api

Send and receive data

curl -v -H 'content-type: text/plain' --data-binary @go.mod localhost:8080/api/ | xargs -I {} curl localhost:8080{}
curl -v -F 'secret=@README.md;type=text/x-markdown' localhost:8080/api/ | xargs -I {} curl -v localhost:8080{}