Zeno icon indicating copy to clipboard operation
Zeno copied to clipboard

Enable domain-level conditional traffic routing through a proxy

Open willmhowes opened this issue 6 months ago • 2 comments

https://github.com/internetarchive/Zeno/blob/a6c07f77bffc3ad3bc8a05abb5ef95404e00b763/internal/pkg/archiver/archiver.go#L33-L42

The archiver struct is defined with the idea of supporting two HTTP clients in mind, so that some traffic can selectively be routed through a proxy.

Here is where to start:

https://github.com/internetarchive/Zeno/blob/a6c07f77bffc3ad3bc8a05abb5ef95404e00b763/cmd/get.go#L29

  • [ ] Add new command flag(s). This how the command flag used to look in an old version of Zeno, but perhaps the argument logic should be more flexibly inclusive OR exclusive: https://github.com/internetarchive/Zeno/blob/04eb2ed8bb15a35db4c252e78eeabed1c80216fa/cmd/v2/get.go#L58

https://github.com/internetarchive/Zeno/blob/a6c07f77bffc3ad3bc8a05abb5ef95404e00b763/internal/pkg/config/config.go#L26-L126

  • [ ] Update Config struct to support new command flags

https://github.com/internetarchive/Zeno/blob/a6c07f77bffc3ad3bc8a05abb5ef95404e00b763/internal/pkg/archiver/warc.go#L74-L87

  • [ ] The non-proxy client needs to be created unconditionally, which is currently not happening (?)

https://github.com/internetarchive/Zeno/blob/a6c07f77bffc3ad3bc8a05abb5ef95404e00b763/internal/pkg/archiver/archiver.go#L255-L260

  • [ ] Logic must be introduced to determine which HTTP client will be used depending on domain of the URL. This is the bulk of the work and could involve modifying code outside of internal/pkg/archiver/archiver.go depending on how it's implemented

willmhowes avatar Jun 25 '25 19:06 willmhowes

Similar to #136 ?

yzqzss avatar Jun 27 '25 12:06 yzqzss

Similar to #136 ?

Yes, but I believe that issue was for Zeno v1 when we already had domain-level conditional traffic routing. Because that functionality was lost in the v2 upgrade, this issue aims to add it back. I'm not opposed to merging the tickets, perhaps!

willmhowes avatar Jun 30 '25 23:06 willmhowes