Giter Club home page Giter Club logo

Comments (6)

rofl0r avatar rofl0r commented on July 22, 2024

in case you talk about the auth-once mode, you could implement this functionality easily with a tiny shell script wrapper:

/bin/microsocks-authed

#!/bin/sh
MICROSOCKS=microsocks
user=foo
pass=bar
ip=127.0.0.1
port=1081

auth_once_delayed() {
 sleep 1
 curl --socks5 ${user}:${pass}@${ip}:${port} http://ifconfig.me
}

auth_once_delayed &
exec $MICROSOCKS -1 -i $ip -p $port -u "$user" -P "$pass"

if you don't want to hardcode user, pass, etc you could add a small getopt loop that parses same parameter as microsocks

from microsocks.

mimi89999 avatar mimi89999 commented on July 22, 2024

The problem is that I can't run shell scripts on the device. I worked it around by adding

@@ -416,6 +423,9 @@ int main(int argc, char** argv) {
                                return usage();
                }
        }
+       union sockaddr_union whitelist_addr = {.v4.sin_family = AF_UNSPEC};
+       resolve_sa("MY_IP", 0, &whitelist_addr);
+       add_auth_ip(&whitelist_addr);
        if((auth_user && !auth_pass) || (!auth_user && auth_pass)) {
                dprintf(2, "error: user and pass must be used together\n");
                return 1;

from microsocks.

rofl0r avatar rofl0r commented on July 22, 2024

nice work. the code of microsocks is deliberately kept simple and readable so users can easily change it to suit their specific usecase.

from microsocks.

mimi89999 avatar mimi89999 commented on July 22, 2024

I think that it's a useful feature that could be used by other users

from microsocks.

rofl0r avatar rofl0r commented on July 22, 2024

maybe. if i get more requests for it in the future i'll consider implementing it. time will tell whether there's a real demand.

from microsocks.

Jieiku avatar Jieiku commented on July 22, 2024

I see this got added... I am assuming use it like this:

microsocks -1 -i 0.0.0.0 -p 1080 -w 192.168.1.40 -u user -P password

assuming that is correct, can you specify more than one ip for the whitelist parameter?

Thank you for this software!

EDIT: I assumed wrong, I must not be using the -w feature correctly

from microsocks.

Related Issues (20)

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.