Coder Social home page Coder Social logo

alexcoder04 / rfap-go-server Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 108 KB

proof-of-concept file transfer protocol - server side

License: GNU Affero General Public License v3.0

Go 96.17% Makefile 3.83%
file-share server rfap ftp go golang file-sharing file-transfer protocol

rfap-go-server's Introduction

Archivation Note

As of now, I lost interest on this project and shifted focus to other things. That's why I have to archive rfap-go-server. If you are interested in continuing this project, please email me, so I can explain some details to you or unarchive this repo and add you as contributor.

Maybe I'll work on a new version of rfap with TLS encryption, but that's not sure for now.


rfap-go-server

GitHub release GitHub top language License GitHub issues GitHub pull requests GitHub commit activity GitHub contributors

The reference server implementation of the rfap protocol, written in Go. It shares a local folder, which can be then accessed over the network using an rfap client.

See here for protocol specifications and related projects.

Installation

Stable release

Simply download the binary for your OS from the releases page.

Bleeding-edge

Make sure you have git, make and go installed.

git clone https://github.com/alexcoder04/rfap-go-server
cd rfap-go-server

make run       # start testing server
make linux     # compile linux executable
make windows   # compile windows executable
make raspberry # compile linux arm executable
make mac-intel # compile mac intel executable
make install   # compile and install executable to $GOPATH/bin

Please use make to compile the server, because it tells go to inject build information into the executable which is then useful for understanding logs.

Related projects

Contributing

We appreciate any kind of contribution! Check out CONTRIBUTING.md for more info.

rfap-go-server's People

Contributors

alexcoder04 avatar boettcherdasoriginal avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

oi2996814

rfap-go-server's Issues

Standartize int variable types

Especially in recv.go we have many different int variable types (int, uint32, uint16), which are converted back and forward. We should standartize them to one same type.

Caching

When rfap-fuse is ready, we will have a first client which does a lot of frequent requests. We could improve performance then, if we cache some data (content of the / folder or contents of large files) in memory.

Documentation

The project is starting to get bigger, so at some point we will need to make a detailed documentation.

Autostart

  • Service files for Linux init systems (Systemd, OpenRC)
  • How does autostart work on Windows?

Optional JSON logs

JSON logs are available in the logrus logging library which we are using; they are useful for automatic log analysis

Server console

Some kind of way to control the server: restart it, reload the configuration, shut down, ...
Original issue on the main repo:

What should we use for the console?
Stdin is not an option, because we don't have a window with the server running open all the time; moreover the server would print messages while you are typing your command, so it wouldn't really work.
A Unix domain socket would be much better, but it's not supported on Windows (does Windows have something like that?).
Another socket listening on localhost? Seems complicated to me.

The best solution that comes to my mind is to write a simple rfap-go-server-ctl utility which would send messages to the main process.

Refactor conn.go

Most of the cases in the switch statement there do the same thing with different vars. It could be made more clearly arranged.

[Security] RequestDetails

An attacker could crash the server if he requests details (e.g. directory size) on a big directory a lot of times

Cleaning up source code

The src folder is starting getting a little bit messy and as far as I know, Go code should be located in the root of the repository, so we should structure the code into submodules/subpackets to improve maintainablility

Custom YML (de)serializer

Undefined values in header like 0 or "" have not to be necessary sent, however they are generated by the YML (de)serializer. With use of a helper function, we could filter out these values and reduce size of the header

Implement write/create commands

This work is done in the v0.3 branch.

  • file_delete
  • file_create
  • file_copy
  • file_move
  • file_write
  • directory_delete
  • directory_create
  • directory_copy
  • directory_move

Compression

In some future version of rfap, optional compression will be introduced. We will implement it as well as even optionally saving files compressed (only if they are text files of course).

Unit Testing

We should write Unittests and make use of them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.