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

[Feature] Support for requests through HTTP proxy #90

Open
zicklag opened this issue Mar 3, 2018 · 4 comments
Open

[Feature] Support for requests through HTTP proxy #90

zicklag opened this issue Mar 3, 2018 · 4 comments

Comments

@zicklag
Copy link

zicklag commented Mar 3, 2018

I am behind an HTTP proxy that requires authentication and I need to make HTTP/HTTPS requests through the proxy in order to get to the Internet. It would be perfect if we could implement this functionality in Tink.

In particular, I would hope to be able to use it for the Lix project. I have an open issue about it here: lix-pm/lix.client#29

@kevinresol
Copy link
Member

I think we could do something like this

class ProxyClient implements ClientObject {
  var client:Client;
  var settings:ProxySettings;

  public function new(client, settings) {
    this.client = client;
    this.settings = settings;
  }

  public function request(req) {
    var header = ...; // modify the header according to the proxy settings
    return client.request(new OutgoingRequest(header, req.body));
  }
}

@zicklag
Copy link
Author

zicklag commented Mar 29, 2018

I like it! 😉 I don't have a whole lot of time to work on it, but if I get the chance I'll try it. Thanks.

@kevinresol
Copy link
Member

Any updates?

@zicklag
Copy link
Author

zicklag commented Mar 6, 2019

I never really got to work on it unfortunately. Got busy. 😕 And the project I'm working with right now is Kha and Armory3D and they use git submodules for everything, so it hasn't been as necessary for me.

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

No branches or pull requests

2 participants