Coder Social home page Coder Social logo

lokinet-socks's Introduction

My cause

Law change that protect you from evil sibling https://www.facebook.com/mahm25/posts/1078633392633275

Lokinet socks proxy inside Docker

Run Lokinet inside Docker without much hassle. Note that this image just downloads, compiles, and starts Lokinet. It has no practical purpose aside being a base on which other containers (like Caddy routed with Lokinet inside Docker) can be built.

Compiling

Attention: you don't need to do this! There's already a pre-built image on DockerHub. You might want to do compile the image by yourself only if the DockerHub one doesn't work on your architecture or you don't trust that image.

After cloning the repository and CD-ing in the correct folder, run:
sudo docker build . -t mahdi5/lokinet-socks

Running

In case you want to run this image, be aware that because of Docker quirks, you have to give the container the NET_ADMIN privilege, and share the TUN device. This probably doesn't work on Windows. (Use Linux)

docker run --name lokinet --publish 1080:1080 --cap-add=NET_ADMIN --device=/dev/net/tun mahdi5/lokinet-socks:latest

You should see some startup logs when the container is starting.

Testing

  1. docker exec -it lokinet /bin/bash
  2. curl http://probably.loki/echo.sh
  3. Use exit to leave the shell.

Troubleshooting

I get an error message saying "Illegal instruction (core dumped)"
Sorry, you'll have to compile the image by yourself instead of using the DockerHub one. Refer to the "Compiling" section of this README to know how.

I see an error message/warning in the Lokinet bootstrap, should I worry?

  • Generally, all warns (yellow) can be ignored. The only exception is if keep getting warns that contain [somethingsomething].loki has no first hop candidate after 1:30 mins of runtime. You should consider restarting your container.
  • If you get an error saying Cannot open /dev/net/tun: No such file or directory, make sure you have included --cap-add=NET_ADMIN --device=/dev/net/tun when running docker run. This error could also happen when trying to use this container in Windows, where I don't think there's a workaround other than getting a decent OS.

lokinet-socks's People

Contributors

mahdi-ln avatar muenchhausen avatar pascalandy avatar kenorb avatar

Stargazers

jeff avatar

Watchers

 avatar

Forkers

overphoenix

lokinet-socks's Issues

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.