Comments (6)
+1
My idea was to implement a plugin for a document management systems which contacts a croc relay to retrieve a file. Is there any documentation on how to talk to the relay?
from croc.
check cli.go to see how to use croc as an API: https://github.com/schollz/croc/blob/v9.6.15/src/cli/cli.go
from croc.
I was actually hoping for something the describes the protocol between client and relay, because I do not intend to use go but php to access the relay.
from croc.
you don't need to use Go. but that file describes the protocol in Go code
from croc.
It's still difficult to collect the parts together. Most of the protocol code appears to be in https://github.com/schollz/croc/blob/v9.6.15/src/croc/croc.go but I'm still missing the overall picture for receiving a file which has been send to a relay.
from croc.
I'm still missing the overall picture for receiving a file which has been send to a relay
here's the overall picture on how receiving a file with croc works:
-
when you run
croc receive <code>
, croc starts by connecting to the relay server using the provided code. -
the relay server helps both the sender and receiver establish a connection, even if they are behind different network setups like nat or firewalls.
-
once connected through the relay, croc sets up an encrypted channel using the same code to ensure the transfer is secure.
-
croc attempts to switch to a direct peer-to-peer connection for better speed. if that's not possible, it continues using the relay. the file transfer begins, and you will see progress updates in your terminal.
-
after the file is fully transferred, croc verifies the integrity of the received file to make sure everything is correct.
you can find the main logic for handling this process in croc.go
, but it also interacts with several other parts of the codebase for encryption, connection handling, and progress reporting.
from croc.
Related Issues (20)
- Winget Release Action is broken HOT 8
- No LICENSE file in binary releases HOT 2
- Developing Apis to interact with Croc programmatically HOT 1
- avrira antivirus virus alert after 9.6.10 version HOT 1
- Croc fail to run when HOME env var is not defined HOT 1
- prevent sleeping while transferring HOT 1
- Waiting for a room HOT 1
- Firefly, the easiest WireGuard VPN server
- Send/Receive --local fails, firewall issue? HOT 2
- Version 9.6.16 reports 9.6.15 as version HOT 2
- Claims an Exported Variable is Required to Receive Data HOT 1
- V10 can't secure channel error HOT 15
- fix: improve ux around linux environmental variables
- Extend "--transfers" flag to relay in addition to send HOT 1
- Folders and Chinese name files cannot be transferred
- winget integration now requires Microsoft CLA HOT 5
- curl command no longer works HOT 4
- create flag with warning to enable classic mode for passing shared secret
- Feature request: locate config files on the folder where the executable is. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from croc.