... | ... | @@ -7,4 +7,98 @@ |
|
|
* Who: Arti devs, anybody who is interested in embedding Arti
|
|
|
* Duration: 1 hour
|
|
|
* Description: Let's talk about our experiences embedding arti, learn more about how to do it, and improve the roadmap for making it easier in the future.
|
|
|
* Pad (seesion notes) https://pad.riseup.net/p/202209MeetingEmbeddingArti |
|
|
\ No newline at end of file |
|
|
|
|
|
|
|
|
informal notes from session:
|
|
|
|
|
|
```
|
|
|
202209MeetingEmbeddingArti
|
|
|
==========================
|
|
|
|
|
|
|
|
|
3 things:
|
|
|
* replace C tor when running chutney;
|
|
|
maybe replace chutney with Rust program that runs many Arti Tor instance
|
|
|
|
|
|
* STEM Python libraries using Tor control port:
|
|
|
replacement thing to drive Arti from Python?
|
|
|
6 tools right now using STEM. STEM currently unmaintained
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct arti_client *arti_handle;
|
|
|
arti_error arti_create(arti_handle *out, arti_config *config /* borrowed */);
|
|
|
arti_error arti_bootstrap(arti_handle*);
|
|
|
arti_error arti_start_socks_proxy(arti_handle*, int listen_fd);
|
|
|
arti_error arti_reconfigure(arti_handle*, arti_config*);
|
|
|
void arti_destroy(arti_handle); <-- This needs to clean up behind itself properly, because the containing process might not get stopped, but continue running! Y
|
|
|
|
|
|
int arti_socket_connect(arti_handle*, struct sockaddr*, socklen_t);
|
|
|
|
|
|
What's also needed is an event handler. E.g. register some callback for changes in the state of arti.
|
|
|
|
|
|
struct arti_config {
|
|
|
many autogenerated fields
|
|
|
type mapping
|
|
|
?????
|
|
|
this is quite hard really
|
|
|
int log_level;
|
|
|
}
|
|
|
Or maybe?
|
|
|
void set_log_level(arti_config *updated, int log_level);
|
|
|
but still need FFI for these? Or serde? ???
|
|
|
|
|
|
arti_error arti_config_new_default(arti_config *out /* malloc'd */);
|
|
|
void arti_config_free(arti_config*);
|
|
|
void arti_config_update_from_toml(arti_config*, const char *toml);
|
|
|
void arti_config_update_from_json(arti_config*, const char *json);
|
|
|
void arti_config_set_json(arti_config*, const char *key /*dotted path*/, const char *value /* json value syntax */);
|
|
|
|
|
|
|
|
|
|
|
|
What do we need to provide? (APIs)
|
|
|
|
|
|
|
|
|
Pain points?
|
|
|
|
|
|
|
|
|
Examples,docs,...?
|
|
|
|
|
|
|
|
|
/**
|
|
|
This is how I'd like to use arti: :-) ~tla
|
|
|
**/
|
|
|
class ArtiManager {
|
|
|
|
|
|
let art: Arti
|
|
|
|
|
|
init() {
|
|
|
|
|
|
let config = ArtiConfig(...)
|
|
|
|
|
|
arti = Arti(config)
|
|
|
|
|
|
arti.registerStateCallback(&this.artiStateCallback)
|
|
|
|
|
|
arti.start()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
func stop() {
|
|
|
|
|
|
arti.stop()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
func artiStateCallback(...) {
|
|
|
|
|
|
...
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
If maybe the control port is not going to be reimplemented in rust and a web API is considered,
|
|
|
``` |
|
|
\ No newline at end of file |