Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to enable pcap logging at generation phase #21

Open
marcosimioni opened this issue Jun 29, 2021 · 2 comments
Open

Ability to enable pcap logging at generation phase #21

marcosimioni opened this issue Jun 29, 2021 · 2 comments

Comments

@marcosimioni
Copy link
Contributor

For some simulations I'm running, and also for testing #5, I find it handy to have shadow generate pcap files. At the moment, I have to generate the network with tornettools, and then manually add the pcap_directory option to those hosts that I want to debug (e.g. hiddenservices).

I think we could add a new --pcap option to the generation phase.

It could be an all-or-nothing, i.e. if --pcap is passed at generation phase, then we prepare a pcap subfolder for each host, and we add a pcap_directory option to all the generated hosts pointing to their pcap subfolder.

or it could be selective, i.e. could take a comma separated list of parameters among servers,hiddenservices,clients, etc (e.g. --pcap servers,hiddenservices will enable pcap dumping only for servers and hiddenservices, etc.)

Thoughts?

I can work on a PR for this if you think it's useful and you confirm the behavior your prefer.

@stevenengler
Copy link
Contributor

This seems useful, but I'm not sure how many of Shadow's configuration options we want to expose as tornettools options. Maybe there's a nicer way we could allow the user to customize any part of Shadow's configuration options?

@robgjansen Have you thought about providing an API for tornettools so that you could build networks programmatically, allowing users to add their own customizations before generating the final files? Or did you want tornettools to stick to a CLI tool only?

@robgjansen
Copy link
Member

tornettools is designed primarily to generate a Tor network config that is as close as possible to the Tor network. It sounds like a really big mess and a lot of maintenance overhead to try to add every option that Shadow supports to tornettools, so I would rather not expand tornettools that way.

Given that we have a tornettools generated config, how to customize that config for specific use-cases is somewhat of a separate issue. I think it's a very easy script to loop over the hosts and add specific options. We could just provide an example of how to do this for a specific config (e.g., adding the pcap option), and then users can use that exampling as a starting point and edit it if they want to tweak the config in other ways.

build networks programmatically

This does sound useful, but I don't think its worth being given priority over other more important work at this point. I think the example script described above already gets us most of the way there and is less rigid than tornettools would become if we rely on it to know about all of the possible shadow options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants