Skip to content

Commit 5b6e712

Browse files
committed
chore: update usage in README and LICENSE year
1 parent 08f9d39 commit 5b6e712

File tree

2 files changed

+39
-29
lines changed

2 files changed

+39
-29
lines changed

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2024 Zack
3+
Copyright (c) 2017-2025 Zack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+38-28
Original file line numberDiff line numberDiff line change
@@ -49,76 +49,77 @@ sudo port install croc
4949

5050
On Windows you can install the latest release with [Scoop](https://scoop.sh/), [Chocolatey](https://chocolatey.org), or [Winget](https://learn.microsoft.com/en-us/windows/package-manager/):
5151

52-
```
52+
```bash
5353
scoop install croc
5454
```
5555

56-
```
56+
```bash
5757
choco install croc
5858
```
5959

60-
```
60+
```bash
6161
winget install schollz.croc
6262
```
6363

6464
On Unix you can install the latest release with [Nix](https://nixos.org/nix):
6565

66-
```
66+
```bash
6767
nix-env -i croc
6868
```
6969

7070

7171
On Alpine Linux you have to install dependencies first:
7272

73-
```
73+
```bash
7474
apk add bash coreutils
7575
wget -qO- https://getcroc.schollz.com | bash
7676
```
7777

7878
On Arch Linux you can install the latest release with `pacman`:
7979

80-
```
80+
```bash
8181
pacman -S croc
8282
```
8383

8484
On Fedora you can install with `dnf`:
8585

86-
```
86+
```bash
8787
dnf install croc
8888
```
8989

9090
On Gentoo you can install with `portage`:
91-
```
91+
92+
```bash
9293
emerge net-misc/croc
9394
```
9495

9596
On Termux you can install with `pkg`:
9697

97-
```
98+
```bash
9899
pkg install croc
99100
```
100101

101102
On FreeBSD you can install with `pkg`:
102103

103-
```
104+
```bash
104105
pkg install croc
105106
```
106107

107108
On Linux, macOS, and Windows you can install from [conda-forge](https://github.com/conda-forge/croc-feedstock/) globally with [`pixi`](https://pixi.sh/):
108109

109-
```
110+
```bash
110111
pixi global install croc
111112
```
112113

113114
or into a particular environment with [`conda`](https://docs.conda.io/projects/conda/):
114115

115-
```
116+
```bash
116117
conda install --channel conda-forge croc
117118
```
118119

119120
Or, you can [install Go](https://golang.org/dl/) and build from source (requires Go 1.17+):
120121

121-
```
122+
```bash
122123
go install github.com/schollz/croc/v10@latest
123124
```
124125

@@ -129,7 +130,7 @@ On Android there is a 3rd party F-Droid app [available to download](https://f-dr
129130

130131
To send a file, simply do:
131132

132-
```
133+
```bash
133134
$ croc send [file(s)-or-folder]
134135
Sending 'file-or-folder' (X MB)
135136
Code is: code-phrase
@@ -149,15 +150,15 @@ There are a number of configurable options (see `--help`). A set of options (lik
149150

150151
On Linux and Mac OS, the sending & receiving is slightly different to avoid [leaking the secret via the process name](https://nvd.nist.gov/vuln/detail/CVE-2023-43621). On these systems you will need to run `croc` with the secret as an environment variable. For example, to receive with the secret `***`:
151152

152-
```
153+
```bash
153154
CROC_SECRET=*** croc
154155
```
155156

156157
This will show only `croc` in the process list of a multi-user system and not leak the secret.
157158

158159
For a single-user system the default behavior can be permanently enabled by running
159160

160-
```
161+
```bash
161162
croc --classic
162163
```
163164

@@ -168,30 +169,39 @@ Run this command again to disable classic mode.
168169

169170
You can send with your own code phrase (must be more than 6 characters).
170171

171-
```
172+
```bash
172173
croc send --code [code-phrase] [file(s)-or-folder]
173174
```
174175

175176
### Allow overwriting without prompt
176177

177178
By default, croc will prompt whether to overwrite a file. You can automatically overwrite files by using the `--overwrite` flag (recipient only). For example, receive a file to automatically overwrite:
178179

179-
```
180+
```bash
180181
croc --yes --overwrite <code>
181182
```
182183

184+
### Excluding folders
185+
186+
You can exclude folders from being sent by using the `--exclude` flag with a string of comma-delimited exclusions. For example, if you want to send a folder but exclude any `node_modules` folders or `.venv` folders:
187+
188+
```bash
189+
croc send --exclude "node_modules,.venv" [folder]
190+
```
191+
192+
Exclusions work by excluding any absolute path that contains the string. So in the above example, any folder named `node_modules` or `.venv` will be excluded from the transfer.
183193

184194
### Use pipes - stdin and stdout
185195

186196
You can pipe to `croc`:
187197

188-
```
198+
```bash
189199
cat [filename] | croc send
190200
```
191201

192202
In this case `croc` will automatically use the stdin data and send and assign a filename like "croc-stdin-123456789". To receive to `stdout` at you can always just use the `--yes` will automatically approve the transfer and pipe it out to `stdout`.
193203

194-
```
204+
```bash
195205
croc --yes [code-phrase] > out
196206
```
197207

@@ -202,7 +212,7 @@ All of the other text printed to the console is going to `stderr` so it will not
202212

203213
Sometimes you want to send URLs or short text. In addition to piping, you can easily send text with `croc`:
204214

205-
```
215+
```bash
206216
croc send --text "hello world"
207217
```
208218

@@ -213,15 +223,15 @@ This will automatically tell the receiver to use `stdout` when they receive the
213223

214224
You can use a proxy as your connection to the relay by adding a proxy address with `--socks5`. For example, you can send via a tor relay:
215225

216-
```
226+
```bash
217227
croc --socks5 "127.0.0.1:9050" send SOMEFILE
218228
```
219229

220230
### Change encryption curve
221231

222232
You can choose from several different elliptic curves to use for encryption by using the `--curve` flag. Only the recipient can choose the curve. For example, receive a file using the P-521 curve:
223233

224-
```
234+
```bash
225235
croc --curve p521 <codephrase>
226236
```
227237

@@ -231,23 +241,23 @@ Available curves are P-256, P-348, P-521 and SIEC. P-256 is the default curve.
231241

232242
You can choose from several different hash algorithms. The default is the `xxhash` algorithm which is fast and thorough. If you want to optimize for speed you can use the `imohash` algorithm which is even faster, but since it samples files (versus reading the whole file) it can mistakenly determine that a file is the same on the two computers transferring - though this is only a problem if you are syncing files versus sending a new file to a computer.
233243

234-
```
244+
```bash
235245
croc send --hash imohash SOMEFILE
236246
```
237247

238248
### Self-host relay
239249

240250
The relay is needed to staple the parallel incoming and outgoing connections. By default, `croc` uses a public relay but you can also run your own relay:
241251

242-
```
252+
```bash
243253
croc relay
244254
```
245255

246256
By default it uses TCP ports 9009-9013. Make sure to open those up. You can customize the ports (e.g. `croc relay --ports 1111,1112`), but you must have a minimum of **2** ports for the relay. The first port is for communication and the subsequent ports are used for the multiplexed data transfer.
247257

248258
You can send files using your relay by entering `--relay` to change the relay that you are using if you want to custom host your own.
249259

250-
```
260+
```bash
251261
croc --relay "myrelay.example.com:9009" send [filename]
252262
```
253263

@@ -258,13 +268,13 @@ Note, when sending, you only need to include the first port (the communication p
258268
If it's easier you can also run a relay with Docker:
259269

260270

261-
```
271+
```bash
262272
docker run -d -p 9009-9013:9009-9013 -e CROC_PASS='YOURPASSWORD' schollz/croc
263273
```
264274

265275
Be sure to include the password for the relay otherwise any requests will be rejected.
266276

267-
```
277+
```bash
268278
croc --pass YOURPASSWORD --relay "myreal.example.com:9009" send [filename]
269279
```
270280

0 commit comments

Comments
 (0)