notion-search-alfred-workflow icon indicating copy to clipboard operation
notion-search-alfred-workflow copied to clipboard

add support for macOS http proxy

Open coolyrat opened this issue 3 years ago • 3 comments

Very useful workflow! It would be great if the workflow supports proxy settings.

image

coolyrat avatar Aug 25 '21 10:08 coolyrat

Thanks for the comment!

If anyone has any examples of workflows supporting a proxy, please let me know. I don't know how this would be implemented or how it works in Alfred.

wrjlewis avatar Aug 25 '21 14:08 wrjlewis

Is there any chance to add one more variable for the proxies? I am not familiar with python 😭 After some research I found this

image

https://github.com/wrjlewis/notion-search-alfred-workflow/blob/5852ab31f918a83cb4bc80f932dbb454734b7095/notion.py#L159

coolyrat avatar Aug 25 '21 14:08 coolyrat

I tired it follow this stackoverflow answer , it works well.

Modify 3 such codes in notion.py

conn = http.client.HTTPSConnection("www.notion.so")

TO

conn = http.client.HTTPSConnection("127.0.0.1",8888) // proxy host, proxy port
conn.set_tunnel("www.notion.so")

Maybe we can add a workflow optional variable to set proxy address and read it in code.

Huweicai avatar Dec 11 '22 16:12 Huweicai