Tencent / TSW

Tencent Server Web

Home Page:https://tswjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when settings with http proxy, tsw may raise exception with trying dns lookup error

tuhaolam opened this issue · comments

commented

system settings:

export http_proxy="127.0.0.1:12639"

Exceptions

//Requests
curl -v localhost:4443/path/to/foo -X POST -d "hello, server"
//Server log
2020-05-16 21:42:41.517 [DEBUG] [4157 0]  dns lookup for 12639
2020-05-16 21:42:41.519 [DEBUG] [4157 0]  [0] Request begin. GET 12639 ~ http://jsonplaceholder.typicode.com/todos/1
2020-05-16 21:42:41.523 [DEBUG] [4157 0]  dns lookup [9ms]: 12639 > 0.0.49.95
2020-05-16 21:42:41.524 [DEBUG] [4157 0]  [0] Dns lookup 12639 -> 0.0.49.95. Cost 3ms
2020-05-16 21:42:41.527 [ERROR] [4157 0]  [0] Request error. Stack: Error: connect ECONNREFUSED 0.0.49.95:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14)

@tuhaolam http_proxy="http://127.0.0.1:12639" works.

I highly doubt that it's a axios proxy url parsing bug.