How to test Linux capabilities & pluggable transports

Hello David, the other day you asked for a quick way to test Linux capabilities and pluggable transports (to combine #7875 and #8195). What you probably want to do, is write a small script that prints the active Linux capabilities, spawn it as a pluggable transport, and check its output to see if the capabilities we wanted it to inherit are active. Here is an example of how to do this. I'm using a python script here, but you can do whatever you want. Use this torrc (only the final line really matters): """ SocksPort 0 ORPort 6666 BridgeRelay 1 PublishServerDescriptor 0 ServerTransportPlugin cap exec /usr/bin/python /home/user/cap.py """ where cap.py can be: """ #!/usr/bin/python print "test test" """ If you start up tor with that torrc ($ ./src/or/tor -f my_torrc), you will get: """ Mar 02 12:54:43.000 [notice] Unknown line received by managed proxy (test test). """ in your Tor output. You can use these lines to debug your capabilities. Otherwise, you can log to a file and read that file instead. Of course in cap.py, you will probably want to print your capabilities, or bind to a port < 1024, or something like that. Feel free to ask any questions you have.
participants (1)
-
George Kadianakis