I asked nickm one day if he knows of any standards for interfaces, and he said "You mean CLI or are you thinking of a GUI?" and I replied "No, just CLI." and then I never got an answer.
I'm pretty sure there are no standards for CLIs, except from the POSIX conventions for command-line options, but really I don't know much about usability.
This trac ticket is to build a nice CLI for obfsproxy.
I started building a getopt() one, but then I remembered that obfsproxy should be running in Windows as well and I got terribly sad.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
What do you think the interface should look like? We could try to imitate other tools like stunnel or nc or various socks proxy programs, but I've never really found any of them very intuitive.
I would say that listener and target addresses belong to the protocol_opts.
but what I really wanted to say is:
I would say that listener addresses belong to protocol_opts and target addresses belong to the protocol_args. Since, at least for now, listener addresses seem to be mandatory, and target addresses seem to be protocol/role dependent.
One thing that the above idea doesn't handle is obfsproxy's ability to handle more than one protocol at a time. There's no way to say, "Provide obfs2 on port 5555, and obfs3 on port 5556" with that interface. Not sure if it matters for our needs though.
One thing that the above idea doesn't handle is obfsproxy's ability to handle more than one protocol at a time. There's no way to say, "Provide obfs2 on port 5555, and obfs3 on port 5556" with that interface. Not sure if it matters for our needs though.
One way we could do this is to have some kind of separator such that each set of options is divided from the next. For example,
Programming question:
atm both network.c and protocols/* stuff are poking into the protocol_params_t structure.
Do you think I should make proto_params_get_* and proto_params_set_* functions for all the elements of protocol_params_t? (like proto_params_set_listen_address_len and proto_params_get_mode)
It's spelled "SEPARATOR", not "SEPERATOR". Sorry; English orthography is stupid.
is_supported_protocol is weirdly described. The documentation needlessly explains how it's implemented ("Run through all the supported protocols") but not what it actually does (return true if name is the name of a protocol and false otherwise).
Maxing out at MAXPROTOCOLS is silly. C has realloc for a reason.
Please imagine doing tech support on "We don't support crappy protocols, son".
What's with making temporary copies of argv when we could just have indices into it?
Having the listener_new functions do the argument parsing is a big abstraction layer violation, and makes everything hard to test. Instead, it's better to have the CLI code generate a listener configuration object, and pass that to the listener_new function.