Coder Social home page Coder Social logo

Proxy about gist HOT 6 CLOSED

jdowner avatar jdowner commented on May 26, 2024
Proxy

from gist.

Comments (6)

jdowner avatar jdowner commented on May 26, 2024

Salut ramnes,

I would like to get this to work with gist, but it is not a mechanism I have worked with before. Typically I use ssh to create a socks proxy for my browser but that is all. It seems that the above environment variables are a convention use by a lot of command line tools, but it is not backed by any shared mechanism. The "requests" library that I am using is supposed to support the upper case version, and I think it is doing that correctly but I have reproduced the "max retries" message while experimenting with it. But I have also got it to work at times...

Just a couple of notes though. One of the warnings on the my-proxy website states that they do not control the proxies and that service may be sproadic. Is it possible that that is the problem? Also, the proxy URLs are not treated the same by all command line tools, e.g. if you do not specify the port explicitly in curl it assumes you are intending to use port 1080, while other tools assume port 80. I know that you have added the port in you example above, but just in case that is placeholder you have added for your example, I thought I would mention it.

Really, I just wanted to let you know that I am working on this, but I have not come to a conclusion yet. However, let me ask you for your input on something. There is an additional option of adding the proxies explicitly to the gist config file. While I would still want gist to use the mechanism that other tools are using, would you find any value in a gist-specific option?

from gist.

jdowner avatar jdowner commented on May 26, 2024

One useful tool is strace,

strace -e trace=connect python

what I am seeing is that requests is using the proxy when I invoke it directly but gist is not. I suspect this could be related to the way that I am manually creating the Request object.

from gist.

jdowner avatar jdowner commented on May 26, 2024

I have pushed a fix for the issue. Thanks for letting me know about it and let me know if you have any more problems.

from gist.

ramnes avatar ramnes commented on May 26, 2024

Hey @jdowner,

Sorry I didn't answer sooner. Your fix works! Thanks a bunch.

Although, when I use a wrong token, when I try to upload an empty file or when I do echo "" | proxy gist create "", I have a non-descriptive error: 1471800999.005 ERROR[gist] 'html_url'.

I can't tell if that issue was present before or not. Do you want me to open another issue about this or do you think it's related to your implementation here?

from gist.

jdowner avatar jdowner commented on May 26, 2024

I don't think that is a new error and is covered by an existing issue (#8)

from gist.

ramnes avatar ramnes commented on May 26, 2024

Woops, I searched for "html_url" in the issue filter and nothing came back, sorry.

from gist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.