Open 13015517713 opened 1 year ago
Use your network interface ip address or 127.0.0.1 as you proxy ip, not 0.0.0.0
Use your network interface ip address or 127.0.0.1 as you proxy ip, not 0.0.0.0
Maybe it's not the reason.
func: inline net::awaitable<void> web_server()
if (m_option.doc_directory_.empty())
{
co_await net::async_write(
m_local_socket,
net::buffer(fake_web_page()),
net::transfer_all(),
net_awaitable[ec]);
net::streambuf bufs(8192);
co_await net::async_read_until(
m_local_socket,
bufs,
"\r\n\r\n",
net_awaitable[ec]);
if (!ec)
m_local_socket.shutdown(
net::socket_base::shutdown_both, ec);
co_return;
}
when recv the GET request, it dirtectly check the doc_directory and return fake page.
when I use curl library to view some pages use this proxy, like
It will use web_server to handle the seesion. I found it will return empty page by judging m_option.docdirectory.empty(). I'm confused that why not it parse target page, resend the request to the page and return the content to client ?