Commit Graph

1072 Commits

Author SHA1 Message Date
iulius98 1a635de69c #454 fixed local transfer 2022-02-20 17:40:50 +02:00
Abhishek 9f66842322 fix sending file with prefix "croc-stdin" renaming on receiver end 2022-02-03 23:09:37 +05:30
Zack Scholl 94c0f66a26 bump 9.5.1 2022-02-03 08:51:19 -08:00
Zack Scholl b0e7d4d5df fix tests 2022-02-03 08:45:50 -08:00
Zack Scholl 1d3c822ef3 allow remembering --internal-dns flag 2022-02-03 08:34:03 -08:00
voocel b45e625298 fix hash file error 2022-01-06 17:44:43 +08:00
Zack Scholl 7390e7ed45 bump 9.5.0 2021-11-18 07:03:47 -08:00
Zack f210ef8877
Merge pull request #435 from AmeyShrivastava/fix-typos
Fix Typos
2021-11-17 10:52:29 -08:00
Amey Shrivastava 2964ede174 Fix Typos (revised)
This commit fixes spelling mistakes (typos) at a few places in the codebase.
(Includes requested corrections)
2021-11-17 23:50:32 +05:30
Zack Scholl cc837fa863 fix ports for tests 2021-11-17 10:11:35 -08:00
Zack c30492609e
Merge pull request #432 from mbattista/master
added throttle upload feature
2021-11-17 09:37:50 -08:00
Zack 2f733891db
Merge pull request #440 from Juneezee/go1.17
build: upgrade to Go 1.17
2021-11-17 09:35:25 -08:00
Eng Zer Jun 1645759742
refactor: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-11-17 11:39:11 +08:00
Hinux Chau d30433658b
Fixed an error
Fixed an error caused by nonexistence of the directory /etc/bash_completion.d/croc
2021-10-27 22:21:31 +08:00
Marcel Battista d372fa1fa4 fix panic on single digit throttles values 2021-10-19 13:10:43 +02:00
Marcel Battista 8ff3fb9b89 added throttle upload feature 2021-10-19 02:46:54 +02:00
Zack Scholl a12f374aba can't use the github ci 8084 2021-10-04 08:02:27 -07:00
jolheiser 2ffb20201c
Fix TCP constant
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-10-03 16:23:29 -05:00
Zack Scholl 89efd38c10 bump 9.4.2 2021-10-02 12:38:32 -07:00
Zack Scholl 49f50a53d5 need to listen on all ports 2021-10-02 12:37:16 -07:00
Zack Scholl 5d9afe03ef bump 9.4.1 2021-10-02 12:29:05 -07:00
Zack Scholl 1637765aad debugging 2021-10-02 12:23:36 -07:00
Zack Scholl ce628ea604 debugging 2021-10-02 12:20:18 -07:00
Zack Scholl ff4307c3c6 debugging 2021-10-02 12:18:50 -07:00
Zack Scholl e5f59fa0f9 fix local 2021-10-02 12:02:25 -07:00
Zack Scholl 04662df347 fix local 2021-10-02 11:55:43 -07:00
Zack Scholl d96c98f4ce bump 9.4.0 2021-10-02 10:45:00 -07:00
Zack Scholl 31db6a76e5 bump 9.4.0 2021-10-02 10:44:48 -07:00
Zack Scholl a996f3c4f4 bump 9.4.0 2021-10-02 10:44:34 -07:00
Zack Scholl 4334c870f5 bump 9.4.0 2021-10-02 10:44:17 -07:00
Zack Scholl 2b1367a09b bump 9.4.0 2021-10-02 10:44:05 -07:00
Zack Scholl add1650cbd bump 9.4.0 2021-10-02 10:43:14 -07:00
Zack Scholl 04f2dfac97 bump 9.4.0 2021-10-02 10:41:46 -07:00
Zack Scholl 060ce516b1 bump 9.4.0 2021-10-02 10:41:26 -07:00
Zack d77c83ce09
Merge pull request #419 from kallydev/patch
Add host flag for relay
2021-10-02 10:35:00 -07:00
Zack a34d29befc
Merge pull request #420 from jolheiser/const
Constants and Message Types
2021-10-02 10:33:52 -07:00
Zack 914d0c98a8
Merge pull request #421 from jolheiser/wildcard
Add wildcard support for files
2021-10-02 10:33:15 -07:00
Brandon Ingalls 860a75fee6 Do not override defaults with empty values
This change will make it so a user who used the -remember
option on an older version of the application will be able
to use the latest version of the software without deleting
their saved config.

fixes schollz/croc#405
relates to schollz/croc#417
2021-10-02 11:12:34 -05:00
jolheiser e380c7b1f1
Add wildcard support
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-10-01 16:49:21 -05:00
jolheiser 2381f26c61
Move to consts and "enum"
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2021-10-01 16:24:28 -05:00
KallyDev de454bbf5a
add host flag for relay 2021-10-01 12:55:28 +08:00
Austin Dworaczyk Wiltshire ef3953a586 Clarify croc's ability to send multiple files/folder
I was personally shocked that I could send multiple files via croc
recently, having done it purely on a whim. The existing CLI
documentation makes no mention of croc's ability to send multiple
files/folders.

This adds it.
2021-08-29 10:16:51 -07:00
Zack Scholl 1d3fdffed6 bump 9.3.0 2021-08-16 12:29:43 -07:00
Charlie Jonas d75530b78b Improve built-in list of public DNS recursors 2021-08-16 18:48:03 +01:00
Charlie Jonas f64f68d5a9 Tidy up code slightly 2021-08-16 18:47:25 +01:00
Charlie Jonas be7705efc3 Remove DNS lookup timeouts 2021-08-16 18:32:55 +01:00
Charlie Jonas df2e29b74d Add --internal-dns flag 2021-08-16 18:25:34 +01:00
Zack Scholl 664936feb2 bump 9.2.1 2021-08-06 13:46:23 -07:00
Zack Scholl 86aeed93db move mutex to avoid race condition #407 2021-08-06 09:48:26 -07:00
Zack Scholl 8d22737fd3 bump 9.2.0 2021-06-21 11:54:11 -07:00
Zack Scholl d442755814 show preparing progress 2021-06-21 11:11:44 -07:00
Zack Scholl ecf3eb872e allow selecting hash 2021-06-21 07:34:28 -07:00
Zack Scholl 646c879edc bump 9.1.6 2021-06-15 15:08:32 -07:00
Zack Scholl 4796404b7e show resume message if resuming
Fixes #402
2021-06-15 14:53:16 -07:00
Zack Scholl 3e2c88c5bc bump 9.1.5 2021-06-10 14:45:24 -07:00
Niko Köser 5e0d6522b0
refactor: accept enter in user prompts
Until now, the process of receiving a file was aborted when an
empty entry (Enter) was made. It is common under *nix that
pressing Enter without prior input of other characters selects
the default answer. This would also make the process more
fluid for croc.

In most usecases the default choice will be 'Y'/'Yes'. The only
exception is the prompt for overwriting existing files. We default
to 'N'/'No' in this prompt to prevent accidental overwriting of
files.
2021-06-10 14:12:05 +02:00
Zack Scholl aa93d3e30f Merge branch 'master' of github.com:schollz/croc 2021-05-12 07:19:09 -07:00
Zack Scholl 15a19e1998 use all the config options 2021-05-12 07:19:02 -07:00
Zack Scholl e1ccb58d8f bump 9.1.4 2021-05-12 07:04:38 -07:00
Zack Scholl d0ebb7ad38 longer time for local connections 2021-05-12 07:04:10 -07:00
Zack Scholl 2bfbacf972 bump 9.1.3 2021-05-11 10:06:14 -07:00
Zack Scholl 66f30c0565 skip autocomplete installation on fish, Fixes #393 2021-05-10 13:47:17 -07:00
Zack Scholl 340bafba3d bump 9.1.2 2021-05-07 10:23:45 -07:00
Zack Scholl e47776bb10 fix 2021-05-07 10:21:24 -07:00
Markus Wamser d5fd2060dd
Distinguish text message from file in receipient dialog
Fixes https://github.com/schollz/croc/issues/388
2021-05-01 21:27:44 +02:00
Zack Scholl 7c28279a58 bump 9.1.1 2021-04-29 09:43:50 -07:00
Zack Scholl 27b7cdbf12 bug fix: doesn't ask overwrite text Fixes #384 2021-04-29 09:16:22 -07:00
Zack Scholl 24fb8746a4 fix deadlock 2021-04-29 09:11:29 -07:00
Alvar Penning 8f5c73837a Prefer local DNS resolver over public DNS servers
The changes cause the local DNS resolver to be used exclusively at
first. If this fails, the public DNS servers are queried as before.

This feature was previously requested. Merging should close #301.

Along the way, three other changes are introduced:

1. A public IPv6 DNS server was added.

2. The lookup returns the first result from a public DNS server and does
   not wait for all queries to be answered.

3. In the unlikely case that no public DNS server is able to answer, an
   error will be returned.
2021-04-26 11:43:45 +02:00
Zack Scholl 5b0883e1fe generate key once 2021-04-21 16:57:18 -07:00
Zack Scholl 420030998f add chacha20 2021-04-21 16:53:29 -07:00
Zack Scholl ab5ae5cbb6 add more benchmarks 2021-04-21 12:40:41 -07:00
Zack Scholl 407e162ec2 bump 9.1.0 2021-04-20 15:57:46 -07:00
Zack Scholl d6af319ad8 fix tests 2021-04-20 15:48:13 -07:00
Zack Scholl 85e7576311 fix 2021-04-20 15:44:28 -07:00
Zack Scholl 7ac7be37af check if file exists 2021-04-20 15:36:46 -07:00
Zack Scholl 669aeb377a check if file exists 2021-04-20 15:35:38 -07:00
Zack Scholl b655afb533 choose hash algorithm 2021-04-20 15:32:05 -07:00
Zack Scholl e9949ce3d7 check file size firsty 2021-04-20 09:08:02 -07:00
Zack Scholl f8ef096784 bump 9.0.0 2021-04-17 20:33:18 -07:00
Zack Scholl 9286b3c965 show folders when receiving 2021-04-17 20:27:51 -07:00
Zack Scholl c1edf24338 fix race condition 2021-04-17 20:07:50 -07:00
Zack Scholl 2ac7d4f31f fix tests 2021-04-17 11:12:15 -07:00
Zack Scholl a96762b942 fix room deletion if room is full 2021-04-17 10:44:10 -07:00
Zack Scholl 0a0f7a03d7 update version 2021-04-17 10:33:38 -07:00
Zack Scholl daf10395a3 update deps 2021-04-17 09:42:11 -07:00
Zack Scholl 9231b1a661 update utils benchmark 2021-04-17 09:39:47 -07:00
Zack Scholl 3e56d4cdb9 use magic bytes instead of checking max 2021-04-17 09:05:27 -07:00
Zack Scholl cec39ba2ce allow changing curve 2021-04-17 09:01:58 -07:00
Zack Scholl 7a997156ed minor 2021-04-16 17:17:32 -07:00
Zack Scholl c02b4f1256 fix: make sure that only pake messages are unencrypted 2021-04-16 17:15:51 -07:00
Zack Scholl babfd5f35f add option to overwrite automatically 2021-04-16 15:14:21 -07:00
Zack Scholl be5ceae8c7 prompt to overwrite 2021-04-16 15:12:11 -07:00
Zack Scholl 6be4080f05 remove hash exchange 2021-04-16 14:25:57 -07:00
Zack Scholl b0693751c1 fix 2021-04-16 14:01:48 -07:00
Zack Scholl 8250a39534 fix: delete room if full and third-party tries to enter 2021-04-16 09:48:11 -07:00
Zack Scholl 2131e99826 use new pake 2021-04-16 09:20:13 -07:00
Zack Scholl 628043b228 fix: do not use part of secret as room name 2021-04-16 08:13:43 -07:00
Tobias Dussa 876ce5764b Transfer symlinks without touching their targets. 2021-04-15 17:07:23 +02:00
Zack 3fd125178f
Merge pull request #341 from MatejKafka/master
Added CROC_CONFIG_DIR env var to support custom config dir path
2021-04-13 15:38:38 -07:00
Zack Scholl 6ba6ec9d32 bump 8.6.12 2021-03-26 16:03:51 -07:00
Zack Scholl c373b38b59 bump 8.6.12 2021-03-26 16:03:31 -07:00
Zack Scholl ff12c33e7f bump 8.6.12 2021-03-26 15:41:45 -07:00
Zack Scholl a9d582cc6a lookup using standard dns 2021-03-26 15:39:33 -07:00
Matej Kafka c1e546ede6
Added CROC_CONFIG_DIR env var to support custom config dir path 2021-03-20 00:50:50 +01:00
Jona 2273438373 add compliance with xdg base directory specification in regards to XDG_CONFIG_HOME 2021-03-17 17:45:07 +01:00
Zack Scholl 50aa24d86d bump 8.6.11 2021-03-15 12:39:04 -07:00
Zack Scholl fb2723d80b don't show description if only sending one file 2021-03-15 11:50:30 -07:00
Zack 6e9156d49c
Merge pull request #337 from alrs/alrs-fix-server-nil-salt-and-keys
src/tcp: fix dropped errors
2021-03-10 08:16:19 -08:00
Lars Lehtonen 3e5b876a32
src/croc: fix dropped errors 2021-03-09 16:55:42 -08:00
Lars Lehtonen a9487a332c
src/tcp: fix dropped errors 2021-03-09 16:48:38 -08:00
Zack Scholl 03a27b6683 bump 8.6.10 2021-03-08 08:41:54 -08:00
Heiko Reese a20ebd7120 Added support for SOCKS5 authentication (fixes #333) 2021-03-06 11:55:16 +01:00
Zack Scholl 10e57c3f97 bump 8.6.9 2021-03-05 11:02:51 -08:00
Zack Scholl 30783ce79c overwrite symlinks on transfer, like files, fixes #334 2021-03-05 09:00:15 -08:00
Zack Scholl cdabf629b6 bump 8.6.8 2021-02-23 12:10:30 -08:00
Zack Scholl 92ab62d03e bump 8.6.8 2021-02-23 12:09:50 -08:00
Zack Scholl 4b0d01d8f0 bump 8.6.8 2021-02-23 12:06:59 -08:00
Zack Scholl cd2802b8b5 shorter dns fail time 2021-02-19 10:18:13 -08:00
Zack Scholl c5ff55a193 find dns from any number of providers 2021-02-19 10:16:58 -08:00
Zack ef43873c3b
Merge pull request #325 from nikoksr/fix/missing-code-too-short-error
fix(cli): make 'code too short' error symmetric on both sender and receiver side
2021-02-02 06:48:21 -08:00
Zack Scholl 7f5d704a26 change name 2021-02-01 06:58:27 -08:00
Niko Köser 3ccd4d07e9
fix: accidentally overwritten error value
In function _cli.send_ the named return value 'err' gets accidentally
overwritten in the deferred anonymous function that removes the
files/directories. Renamed the error variable inside the deferred
function so that it does not overwrite the original error anymore.

Closes #296
2021-02-01 10:34:06 +01:00
Peter 17f3df7e36 Added an option to ignore attached stdin, for compatibility with node child_process 2021-01-10 13:17:43 +00:00
Zack Scholl a2b243ad94 bump 8.6.7 2020-12-28 11:01:27 -08:00
Zack 0994e4eda5
Merge pull request #307 from hillmarcus/306-file-size
Issue #306, File Size Mismatch
2020-12-28 10:46:39 -08:00
vzlcn0 52bc6312e1 add new cmd option to set sender ip 2020-12-17 18:37:48 +03:00
Marcus d735cca970 Issue #306, File Size Mismatch
Updated utils.go to use a `1024` grouping instead of `1000` for file
sizes. This brings it inline with the progress bar project being used.

Updated utils_test.go to match the changes to utils.go
2020-12-07 18:44:12 -06:00
Zack Scholl 5978896936 bump 8.6.6 2020-11-17 16:10:57 -08:00
Zack Scholl 1da2f58a53 faster dns resolution on startup 2020-11-17 10:46:49 -08:00
Zack Scholl 284af7fc7a hm 2020-11-17 10:35:57 -08:00
Zack Scholl dbc4a08ad0 use google for lookup 2020-11-17 10:29:52 -08:00
Zack Scholl b740e491e6 bump 8.6.5 2020-10-23 08:26:15 -07:00
Zack Scholl f51ea8bfdc show progress 2020-10-22 17:03:46 -07:00
Zack Scholl 23f97c61ac bump 8.6.4 2020-10-22 10:18:40 -07:00
Zack Scholl cbb728b9a2 bump 8.6.4 2020-10-22 10:17:58 -07:00
Zack Scholl 9bb2d2b7cc bump 8.6.4 2020-10-22 10:17:33 -07:00
Zack Scholl 3f10a147dd bump 8.6.4 2020-10-22 10:16:55 -07:00
Zack Scholl bf9ebfc4b4 show ping 2020-10-22 10:13:41 -07:00
Zack Scholl d3aa2be9ab ping server from discoveries 2020-10-22 10:11:11 -07:00
Zack Scholl 034e012227 allow pinging 2020-10-22 10:09:04 -07:00
Zack Scholl 79f85fda9b bug fix: return if found error 2020-10-22 09:59:55 -07:00
Zack Scholl 3bcc83a8fc gather all discoveries 2020-10-22 09:53:27 -07:00
Zack Scholl 1d9393d39b bump 8.6.3 2020-10-22 07:40:56 -07:00
Khang. Nguyen Khac Nguyen 4070f12cbf change(croc): shorten flag with builder 2020-10-22 14:06:54 +07:00
Khang. Nguyen Khac Nguyen 8e50b59671 fix(cli): show passphrase when user indicate --pass
+ when user indicate --pass when sending file, indicate --pass flag in
recommended receive command.
2020-10-22 13:37:32 +07:00
Zack Scholl ff45ccd346 bump 8.6.2 2020-10-21 12:52:53 -07:00
Zack Scholl 5a791e98af bump 8.6.2 2020-10-21 12:51:47 -07:00
Zack Scholl 0d767af80a fix makefile 2020-10-21 12:51:43 -07:00
Zack Scholl bb971a9937 bump 8.6.1 2020-10-21 12:50:30 -07:00
Zack Scholl c88d3ad62a update makefile 2020-10-21 12:50:25 -07:00
Zack Scholl 77732c49a0 bump 8.6.0 2020-10-21 10:28:28 -07:00
Zack Scholl b9b22ad041 bump 8.6.0 2020-10-21 10:28:27 -07:00
Zack Scholl 7a73e4912c allow using only local with --local flag 2020-10-21 18:25:56 +01:00
Zack Scholl 1967ef57be bump 8.5.3 2020-10-21 09:41:08 -07:00
Zack Scholl b95c2c781b bump 8.5.3 2020-10-21 09:41:07 -07:00
Zack Scholl ea0e334feb add back ipv6 broadcast 2020-10-21 08:17:39 -07:00
Khang. Nguyen Khac Nguyen e85ac9f8bf chore(croc): remove redundant code
+ remove redundant return of func that does not return
+ remove func that is not used
2020-10-21 15:52:04 +07:00
Khang. Nguyen Khac Nguyen 9f54f2d08f chore(comm): cleanup comm Write func
+ better handling error.
+ use Send instead of Write since we do not need number of bytes sent.
2020-10-21 15:16:42 +07:00
Zack Scholl f5624007c8 bump 8.5.2 2020-10-19 11:04:43 -07:00
Zack Scholl 9b6c33c300 bump 8.5.2 2020-10-19 11:04:42 -07:00
Zack Scholl b66cfb4cc1 disable ipv6 for peer-to-peer discovery since it causes issues 2020-10-19 11:02:48 -07:00
Zack Scholl 539d66806a bump 8.5.1 2020-10-13 15:48:43 -07:00
Zack Scholl 768f3e1318 bump 8.5.1 2020-10-13 15:48:43 -07:00
Zack Scholl a968f494fa better help 2020-10-13 15:47:53 -07:00
Zack Scholl 911bb22b2d better environmental variable 2020-10-13 15:47:00 -07:00
Zack Scholl f3697f6aad reduce packets sent for peer discovery 2020-10-13 13:47:43 -07:00
Zack Scholl 5374be1a0f use dns to determine relay 2020-10-13 12:26:11 -07:00
Zack Scholl 1d874b5dbe bump 8.5.0 2020-10-12 12:34:47 -07:00
Zack Scholl 586fc08768 bump 8.5.0 2020-10-12 12:34:47 -07:00
Zack 5a2d51c060
bash continues if autocompletion fails to install
Fixes #286
2020-10-09 07:16:17 -07:00
Zack 3396743d73
allow proxying connection (#283) 2020-10-05 08:30:45 -07:00
Zack Scholl e75b75164f bump 8.4.0 2020-10-04 13:16:36 -07:00
Zack Scholl 224c442567 bump 8.4.0 2020-10-04 13:16:35 -07:00
Zack 669920d4b5
Merge pull request #281 from TheQueasle/253-autocomplete-install
First pass at adding in the autocomplete files to the installer script
2020-10-04 13:12:04 -07:00
fooofei 5a0ec9431f fix resource leak of *os.File 2020-10-04 10:38:30 +08:00
fooofei bc8c5db898 fix possible panic of nil compressor 2020-10-04 10:38:04 +08:00
fooofei c877497cc9 user io.ReadFull for shorter connection read code 2020-10-04 10:37:36 +08:00
Micheal Quinn 4675976f08 First pass at adding in the autocomplete files to the installer script 2020-09-29 22:19:10 -05:00
ABDUL NIYAS P M 4ce170e73d
Fix a typo in cli.go 2020-09-23 16:28:00 +05:30
Zack Scholl 43d2ff0a09 find open ports to open local relay 2020-09-21 06:02:13 -07:00
Zack Scholl 78e4d5e179 add util to find open ports 2020-09-21 05:51:50 -07:00
Sebastian Falbesoner a313a96a8e fix send without argument (trigger intended error message) 2020-09-19 21:48:11 +02:00
Sebastian Falbesoner 2de73cb138 show all files when sending without send command 2020-09-19 17:52:32 +02:00
Zack Scholl 7b15dcd2dc fork urfave/cli 2020-09-17 13:04:33 -07:00
Zack Scholl fda0bf7fd4 bump 8.3.2 2020-09-16 14:54:02 -07:00
Zack Scholl 7d155adcf1 bump 8.3.2 2020-09-16 14:54:02 -07:00
Zack b144fa28e7
Merge pull request #260 from masterZSH/master
Use hex.EncodeToString to encode to hex
2020-09-16 11:00:09 -07:00
masterZSH f9f32a4b0e Use hex.EncodeToString to encode to hex 2020-09-16 16:37:21 +08:00
Zack Scholl 32bb98fd4f fix making publish 2020-09-15 12:46:07 -07:00
masterZSH 833668e8f2 Add error reporting 2020-09-15 09:33:43 +08:00
Zack Scholl 8a0800ca90 better error 2020-09-13 12:15:05 -07:00
Zack Scholl 4fc40274db use default bash complete 2020-09-13 12:11:18 -07:00
Zack Scholl 8c116cf66a add autocompletion 2020-09-12 08:42:19 -07:00
jolheiser ccba416e85
Env vars for a few CLI options
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-09-09 10:25:13 -05:00
jolheiser 5ad8bd8e2c
Fix aliases
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-09-09 10:06:13 -05:00
jolheiser 9a20d507a7
Update CLI to v2
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-09-09 10:05:57 -05:00
Zack Scholl a5e882ec25 bump 8.3.1 2020-09-06 08:47:32 -07:00
Zack Scholl 9d5302b1b7 bump 8.3.1 2020-09-06 08:47:31 -07:00
Zack Scholl bdb859c15c use version 2020-09-06 08:45:59 -07:00