Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

onion

Tor networking plugin for Docker containers. Route all container tcp traffic through Tor.

Subscribe to updates I use onion


Statistics on onion

Number of watchers on Github 157
Number of open issues 1
Average time to close an issue about 5 hours
Main language Go
Average time to merge a PR about 4 hours
Open pull requests 0+
Closed pull requests 0+
Last commit over 1 year ago
Repo Created over 3 years ago
Repo Last Updated over 1 year ago
Size 2.46 MB
Organization / Authorjessfraz
Contributors2
Page Updated
Do you use onion? Leave a review!
View onion activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating onion for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

onion

Travis CI

Tor networking plugin for docker containers

Installation

Binaries

Via Go

$ go get github.com/jessfraz/onion

Usage

NOTE: Make sure you are using Docker 1.9 or later

WARNING: Use with caution this is still under active development

WARNING: By default all outbound udp traffic in the network should be blocked because it will not be routed through tor.

Start the tor router

NOTE: in the future it should be easier to start any container to route and have the plugin be smart about finding it, but for now.... deal with it.

$ docker run -d \
    --net host \
    --name tor-router \
    jess/tor-router

# follow the logs to make sure it is bootstrapped successfully
$ docker logs -f tor-router

Run the plugin container

$ docker run -d \
    --net host \
    --cap-add NET_ADMIN \
    --name onion \
    -v /run/docker/plugins:/run/docker/plugins \
    -v /var/run/docker.sock:/var/run/docker.sock \
    jess/onion

Create a new network

$ docker network create -d tor vidalia

Test it out!

$ docker run --rm -it --net vidalia jess/httpie -v --json https://check.torproject.org/api/ip

Running the tests

Unit tests:

$ make test

Integration tests:

$ make dtest

Thanks

Thanks to the libnetwork team for writing the networking go plugin and of course the networking itself ;) Also a lot of this code is from the bridge driver in libnetwork itself.

Also huge thanks to the Tor project for protecting the internet.

TODO

  • FIND A WAY TO DO THIS WITHOUT IPTABLES
  • the tor router should be discoverable as any docker image or container name etc and the ports for forwarding should be able to be found through that
  • the tor router should not have to be run as --net host
  • moar tests (unit and integration)
  • exposing ports in the network is a little funky
  • saving state?
  • make deny all udp traffic configurable
  • udp integration tests suck
  • unit tests
onion questions on Stackoverflow (View All Questions)
  • Clean Architecture vs Onion Architecture
  • Authentication in WebAPI using Owin token and Onion architecture
  • Scrapy shell throws DNS lookup Error on .onion sites
  • Implementing onion routing algorithm in Java
  • how to implement services and repositories on onion architecture?
  • Dependency Resolution in Onion Architecture
  • Onion Architecture- Entity Framework Code First Models DataAnnotations
  • Set Scope for Ninject Modules in Onion Architecture
  • Decoupling ASP.NET Identity from the Core Domain Models - Onion Architecture
  • Visual Studio - DDD Modules and Onion
  • Snort rules not picking up content Filename in Security Onion
  • Why don't view .onion URL page in TWebBrowser?
  • Android Socket Host is unresolved *.onion
  • Abstract Factory Pattern in Onion Architecture
  • Placement of view models/DTOs in onion architecture
  • Onion Browser errors (objective-c)
  • How to check connection .onion domain Tor URL in Delphi XE?
  • Onion Architecture in Xamarin.Forms with Autofac
  • Onion and Layers Architecture real world example
  • Onion architecture with IoC on the client
  • Onion Architecture: Should UI project have access to Domain Layer?
  • Onion Architecture: Core vs Domain
  • Does a low level service couple your UI to your Database when using Entity Framework and Onion
  • Good alternatives to onion routing (for anonymously sending messages and/or files over the internet)?
  • How to use ToDataSourceResult from KendoUI in Onion Architecture withouth exposing IQueryable
  • Library/API for tor .onion web calls
  • Error "The 'NuGetPackage' packag did not load correctly" when creating custom .onion address
  • Should my view models be with my domain entities at the core in an onion architecture?
  • In an onion architecture can layers access other layers more then one layer of separation down?
  • Advanced Onion Router - install successfully and connected but my ip address did not change
onion list of languages used
Other projects in Go