wrjlewis / notion-search-alfred-workflow

An Alfred workflow to search Notion with instant results
GNU General Public License v3.0
819 stars 43 forks source link

add support for macOS http proxy #34

Open coolyrat opened 2 years ago

coolyrat commented 2 years ago

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

image

wrjlewis commented 2 years ago

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.

coolyrat commented 2 years ago

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

Huweicai commented 1 year ago

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.