Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

README.md 3.2 KiB

há 7 anos
há 9 anos
há 9 anos
há 9 anos
há 9 anos
há 7 anos
há 9 anos
há 7 anos
há 7 anos
há 7 anos
há 7 anos
há 7 anos
há 9 anos
há 7 anos
há 9 anos
há 7 anos
há 7 anos
há 9 anos
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # transfer.sh [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dutchcoders/transfer.sh?utm_source=badge&utm_medium=badge&utm_campaign=&utm_campaign=pr-badge&utm_content=badge) [![Go Report Card](https://goreportcard.com/badge/github.com/dutchcoders/transfer.sh)](https://goreportcard.com/report/github.com/dutchcoders/transfer.sh) [![Docker pulls](https://img.shields.io/docker/pulls/dutchcoders/transfer.sh.svg)](https://hub.docker.com/r/dutchcoders/transfer.sh/) [![Build Status](https://travis-ci.org/dutchcoders/transfer.sh.svg?branch=master)](https://travis-ci.org/dutchcoders/transfer.sh)
  2. Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.
  3. Transfer.sh support currently the s3 (Amazon S3) provider and local file system (local).
  4. ## Usage
  5. ```
  6. Upload:
  7. $ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
  8. Encrypt & upload:
  9. $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
  10. Download & decrypt:
  11. $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
  12. Upload to virustotal:
  13. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
  14. Add alias to .bashrc or .zshrc:
  15. ===
  16. transfer() {
  17. # write to output to tmpfile because of progress bar
  18. tmpfile=$( mktemp -t transferXXX )
  19. curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
  20. cat $tmpfile;
  21. rm -f $tmpfile;
  22. }
  23. alias transfer=transfer
  24. ===
  25. $ transfer test.txt
  26. ```
  27. ## Usage
  28. Parameter | Description | Value | Env
  29. --- | --- | --- | ---
  30. listener | port to use for http (:80) | |
  31. profile-listener | port to use for profiler (:6060)| |
  32. force-https | redirect to https | false |
  33. tls-listener | port to use for https (:443) | |
  34. tls-cert-file | path to tls certificate | |
  35. tls-private-key | path to tls private key | |
  36. temp-path | path to temp folder | system temp |
  37. web-path | path to static web files (for development) | |
  38. provider | which storage provider to use | (s3 or local) |
  39. aws-access-key | aws access key | | AWS_ACCESS_KEY
  40. aws-secret-key | aws access key | | AWS_SECRET_KEY
  41. bucket | aws bucket | | BUCKET
  42. basedir | path storage for local provider| |
  43. lets-encrypt-hosts | hosts to use for lets encrypt certificates (comma seperated) | |
  44. log | path to log file| |
  45. If you want to use TLS using lets encrypt certificates, set lets-encrypt-hosts to your domain, set tls-listener to :443 and enable force-https.
  46. If you want to use TLS using your own certificates, set tls-listener to :443, force-https, tls-cert=file and tls-private-key.
  47. ## Development
  48. Make sure your GOPATH is set correctly.
  49. ```
  50. go run main.go -provider=local --listener :8080 --temp-path=/tmp/ --basedir=/tmp/
  51. ```
  52. ## Build
  53. ```
  54. go build -o transfersh main.go
  55. ```
  56. ## Docker
  57. For easy deployment we've created a Docker container.
  58. ```
  59. docker run --publish 8080:8080 dutchcoders/transfer.sh:latest --provider local --basedir /tmp/
  60. ```
  61. ## Contributions
  62. Contributions are welcome.
  63. ## Creators
  64. **Remco Verhoef**
  65. - <https://twitter.com/remco_verhoef>
  66. - <https://twitter.com/dutchcoders>
  67. **Uvis Grinfelds**
  68. ## Copyright and license
  69. Code and documentation copyright 2011-2014 Remco Verhoef.
  70. Code released under [the MIT license](LICENSE).