Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

HTTP Proxy Jump Service Features #812

Closed
1 of 17 tasks
coneiric opened this issue Feb 17, 2018 · 6 comments
Closed
1 of 17 tasks

HTTP Proxy Jump Service Features #812

coneiric opened this issue Feb 17, 2018 · 6 comments

Comments

@coneiric
Copy link
Contributor

coneiric commented Feb 17, 2018


By submitting this issue, I confirm the following:

  • I have read and understood the contributor guide in kovri-docs.
  • I have checked that the issue I am reporting can be replicated or that the feature I am suggesting is not present.
  • I have checked opened or recently closed pull requests for existing solutions/implementations to my issue/suggestion.

After looking through the TODOS 1 2 for HTTPMessage::HandleJumpService, I came up with some ideas for a redesign.

edit: add prerequisite issues, reformat as task list

Below are what I understand to be the required features of the jump service handler.
Some are already implemented, others are new proposals:

Related Kovri source files:

Related Java2P source files:

Referencing #305 #337 #338 #811

@anonimal
Copy link
Collaborator

load entries from multiple host files
add new host entry
check address not already in:
hosts.txt
private_hosts.txt
subscription-specific hosts files

These features must be resolved in #305/#337 before they are resolved here.

replace stream instances with cryptopp pipelines, in pursuit of #811

Don't confuse i2p streaming with byte streaming - they are very different.

treat storage as blackbox

Subscriptions are meant to be shared, what do you mean by this?

@anonimal anonimal changed the title HTTP Proxy Jump Service Refactor HTTP Proxy Jump Service Features Feb 19, 2018
@coneiric
Copy link
Contributor Author

These features must be resolved in #305/#337 before they are resolved here.

Happy to start working on those issues first, or in parallel with jump service features that don't depend on loading from multiple hosts files. I'll edit the OP to indicate dependent issues.

Don't confuse i2p streaming with byte streaming - they are very different.

I was confusing them, thanks for the heads up.

Subscriptions are meant to be shared, what do you mean by this?

I was referring to discussion in #385 about a possible database or openldap implementation for various components. So, to cut down on refactoring, I was trying to think of a way to be agnostic about how storage is actually implemented.

Do you think it will be necessary / a good idea to write wrappers around storage functions?

@anonimal
Copy link
Collaborator

So, to cut down on refactoring, I was trying to think of a way to be agnostic about how storage is actually implemented.

That would be a good idea.

Do you think it will be necessary / a good idea to write wrappers around storage functions?

If you really want to hide the implementation, using the pimpl idiom could be helpful. In terms of interface, keep in mind the other uses of the database library (netdb for example).

coneiric added a commit to coneiric/kovri that referenced this issue Feb 20, 2018
For testing and error handling, HTTPMessage::HandleJumpService returns
true on success, and false on failures.

Referencing monero-project#812
coneiric added a commit to coneiric/kovri that referenced this issue Feb 20, 2018
Straightforward unit test to ensure valid jump service GET parameters
are parsed correctly.

Referencing monero-project#812
coneiric added a commit to coneiric/kovri that referenced this issue Feb 20, 2018
Changes how HandleJumpService parses HTTP request headers to properly
search for the jump service address helper in the URI, instead of the path.

Referencing monero-project#812
@coneiric
Copy link
Contributor Author

If you really want to hide the implementation, using the pimpl idiom could be helpful. In terms of interface, keep in mind the other uses of the database library (netdb for example).

Just read through some docs on pimpl [cppreference] [gotw_100].

Going to re-read (and re-re-read) the docs, and come up with a pimpl design for AddressStorage.
Will keep other uses and implementations (file, database, openldap) in mind.

@anonimal
Copy link
Collaborator

FYI, it's a 'compiler firewall' so it's not useful until we have a need to firewall. What could be useful for now is a generic storage interface which is abstracted from filesystem and db processing. That's not specific to this issue (#812) and should be opened in a new issue or commented in #385.

@anonimal
Copy link
Collaborator

anonimal commented Sep 7, 2018

NOTICE: THIS ISSUE HAS BEEN MOVED TO GitLab. Please continue the discussion there. See #1013 for details.

@anonimal anonimal closed this as completed Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants