All Projects → srdja → Na

srdja / Na

Licence: gpl-3.0
Share files on your local network

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Na

Pwndrop
Self-deployable file hosting service for red teamers, allowing to easily upload and share payloads over HTTP and WebDAV.
Stars: ✭ 878 (+5753.33%)
Mutual labels:  file-sharing, http-server
Updog
Updog is a replacement for Python's SimpleHTTPServer. It allows uploading and downloading via HTTP/S, can set ad hoc SSL certificates and use http basic auth.
Stars: ✭ 994 (+6526.67%)
Mutual labels:  file-sharing, http-server
Beetlex
high performance dotnet core socket tcp communication components, support TLS, HTTP, HTTPS, WebSocket, RPC, Redis protocols, custom protocols and 1M connections problem solution
Stars: ✭ 802 (+5246.67%)
Mutual labels:  http-server
Chili
Chili: HTTP Served Hot
Stars: ✭ 7 (-53.33%)
Mutual labels:  http-server
Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+5866.67%)
Mutual labels:  http-server
Docs
Lightweight document management system packed with all the features you can expect from big expensive solutions
Stars: ✭ 827 (+5413.33%)
Mutual labels:  file-sharing
Go Dcpp
Hybrid Direct Connect hub written in Go.
Stars: ✭ 23 (+53.33%)
Mutual labels:  file-sharing
Hug
Embrace the APIs of the future. Hug aims to make developing APIs as simple as possible, but no simpler.
Stars: ✭ 6,572 (+43713.33%)
Mutual labels:  http-server
Jerrymouse
A scalable java servlet container base on reactor
Stars: ✭ 27 (+80%)
Mutual labels:  http-server
Http static
File serving using tower web
Stars: ✭ 18 (+20%)
Mutual labels:  http-server
Farwest
Framework for building RESTful HATEOAS-driven applications.
Stars: ✭ 18 (+20%)
Mutual labels:  http-server
Webmachine Ruby
Webmachine, the HTTP toolkit (in Ruby)
Stars: ✭ 832 (+5446.67%)
Mutual labels:  http-server
Webcpp
用C++开发web服务器框架
Stars: ✭ 23 (+53.33%)
Mutual labels:  http-server
Httpserver
Python 3 implementation of an HTTP server
Stars: ✭ 5 (-66.67%)
Mutual labels:  http-server
Twake
Twake is a secure open source collaboration platform to improve organizational productivity.
Stars: ✭ 862 (+5646.67%)
Mutual labels:  file-sharing
Netcoreserver
Ultra fast and low latency asynchronous socket server & client C# .NET Core library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Stars: ✭ 799 (+5226.67%)
Mutual labels:  http-server
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (+20%)
Mutual labels:  http-server
Waitress
Waitress - A WSGI server for Python 2 and 3
Stars: ✭ 916 (+6006.67%)
Mutual labels:  http-server
Markdownshare
The code behind https://markdownshare.com/
Stars: ✭ 15 (+0%)
Mutual labels:  http-server
Quart
Official mirror of https://gitlab.com/pgjones/quart
Stars: ✭ 872 (+5713.33%)
Mutual labels:  http-server

Na

Share your files with people next to you without having to send them under the ocean and back again.

Build Status License: GPL v3

Na allows you to easily share files over a local network by serving the current working directory through HTTP.

Usage

na [OPTIONS]

Navigate to a directory that you wish to share and run na. Once it's running, you'll be able to access the files from that directory from any device that's on the same network and has a web browser (or something that understands HTTP).

demo

Options

-h | --help                  display help and exit  
-d | --dir [PATH]            specifies the path of the served directory (default is the working directory)
-p | --port [PORT]           specifies the port number (default 8888)
-i | --interface [INTERFACE] specify the network interface to use (eg. `eth0`, `wlo0`, `localhost`, etc...)  
-r | --enable-delete         enables file deletions through DELETE requests (disabled by default)
-u | --disable-upload        disables file uploads (enabled by default)
-s | --show-directory        show the path of the served directory to client (disabled by default)  
-l | --list-interfaces       print a list of available network interfaces and exit
-o | --overwrite-file        if enabled, uploaded files will overwrite existing files with the same name (disabled by default)  
-6 | --ipv6                  prefer IPv6 if available  
-v | --verbose               verbose output  

Using Na without a browser

Obtaining a list of available files

Lists of available resources can be obtained either in JSON at /json, or in a simple list form separated by a newline \n at /list.

An example of obtaining a list of files in JSON form:
curl -X GET http://127.0.0.1:9000/json
[
  {
    "name": ".cargo-lock",
    "url": "/files/.cargo-lock",
    "size": 0,
    "modified": "Tue, Aug 02 2016  02:08:53",
    "modified_raw": 1470096533
  },
  {
    "name": "na",
    "url": "/files/na",
    "size": 18404960,
    "modified": "Wed, Aug 03 2016  04:36:33",
    "modified_raw": 1470191793
  }
]

An example of obtaining a simple list of URLs separated by a newline \n:
curl -X GET http://127.0.0.1:9000/list
/files/.cargo-lock
/files/na
Fetching a file:
curl -X GET "http://127.0.0.1:9000/files/example.txt"
Uploading a single file:
curl --form "[email protected]" http://127.0.0.1:9000
[
  {
    "source_name": "README.md",
    "saved_name": "README.md"
  }
]
Uploading multiple files in a single request:
curl -F "upload[][email protected]" -F "upload[][email protected]" http://127.0.0.1:9000
[
  {
    "source_name": "README.md",
    "saved_name": "README.md (1)"
  },
  {
    "source_name": "build.rs",
    "saved_name": "build.rs"
  }
]

Deleting a file:

curl -X DELETE "http://127.0.0.1:9000/files/example.txt"

note: DELETE is disabled by default, so it needs to be enabled by passing the -r or --enable-delete flag to na

Installation

Linux

Download na:

sudo curl -L https://github.com/srdja/na/releases/download/v0.2.0/na-linux64 -o /usr/local/bin/na

Make na readable and executable for all users:

sudo chmod a+rx /usr/local/bin/na

OS X

Download na:

sudo curl -L https://github.com/srdja/na/releases/download/v0.2.0/na-osx -o /usr/local/bin/na

Make na readable and executable for all users:

sudo chmod a+rx /usr/local/bin/na

Windows

Download the na executable and place it into a directory that you wish to share, or you can put it into a directory that's in your PATH if you wish to use it from the command line.

Building the project

Currently Rust nightly is required to build the project.

  • Build debug with cargo build
  • Build release with cargo build --release

License

GPLv3+

Contributing

Bugs and Features

If you have a feature request, or have found a bug, feel free to open a new issue.

Pull Requests

To get started, fork the repo to your account and then clone your fork:

git clone https://github.com/yourusername/na.git

Once you're done making changes, commit your work and push it to your fork. You can then open a pull request from your fork to the upstream repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].