I haven't found good tutorials on how to make a Proxy server on youtube. I think it will be a good idea to make a tutorial series for Proxy servers with use of: domain/port filters, http/https filters, file extension filters, data caching, use of sockets, async request handling, integration with browsers. With few flaws your tutorial was really helpful, thank you!
I got multiple people reporting ERR_INVALID_RESPONSE's, here is a way to fix it: 1) In Response the mime types of each response should be changed to "text/html". 2) In Response change the Post method to: writer.Flush(); // and then the body data stream.Write(data, 0, data.Length);
if you get an error: An attempt was made to access a socket in a way forbidden by its access permissions. just go to admin cmd and type: netstat -ano and then you can see avalable ports i had to change to 500.
0 1 and 4 are 'GET (which is fine), '\' (which is not what you want, I assume) and HTTP/1.1 Host: (which is not what you want, I assume), and 'keep-alive Cache-Control:' (which is not what you want, I assume).
I have an aspnet project that I published. I used httplistener in this project. I want it to listen on any port number. But it's not working. Is there a different method?
Using above code, i am getting 'type=GET, URL=/, and host=keep-alive' Are these value correct?? I guess host value is not correct. What should be value of host?? "Localhost:8080" or "localhost"?
the problem with the above code is that it assumes that the first header is host, that is not always the case. what you need to do is go through each line, separate it on ": " and ":" and check the first value, the header's name, where the header's name is host, that's what the host value should be. p.s. keep-alive is a value of the connection header so definitely wrong
Your code is readable, I don't think that was the issue. I'm viewing this tutorial in 1080p HD and it IS difficult to see. I personally code using a dark theme but I don't think the dark theme is great for video. You could maybe bump up your font size a couple of notches as well. Otherwise, good job!
I haven't found good tutorials on how to make a Proxy server on youtube. I think it will be a good idea to make a tutorial series for Proxy servers with use of: domain/port filters, http/https filters, file extension filters, data caching, use of sockets, async request handling, integration with browsers. With few flaws your tutorial was really helpful, thank you!
Can you please post what are those flaws ?
I got multiple people reporting ERR_INVALID_RESPONSE's, here is a way to fix it:
1) In Response the mime types of each response should be changed to "text/html".
2) In Response change the Post method to:
writer.Flush();
// and then the body data
stream.Write(data, 0, data.Length);
if you get an error: An attempt was made to access a socket in a way forbidden by its access permissions.
just go to admin cmd and type: netstat -ano and then you can see avalable ports i had to change to 500.
can you share your code on some repos...
Please, can anyone explain me why we must use "thread" in here to implement.
Thank you so much.
Hi, you need to use a Thread because if you do a while loop in the main Thread the console will be frozen! because Main Thread is busy
A Better way to do it is use it all Asyc!
0 1 and 4 are 'GET (which is fine), '\' (which is not what you want, I assume) and HTTP/1.1
Host: (which is not what you want, I assume), and 'keep-alive
Cache-Control:' (which is not what you want, I assume).
I have an aspnet project that I published. I used httplistener in this project. I want it to listen on any port number. But it's not working. Is there a different method?
"{0} {1}
Server: {2}
Content-Type: {3}
Accept-Ranges
Content-length: {4}
"
How to make it a multithreaded web server usin boss-worker model? ,,, i mean where can i integrate that code ?
Using above code, i am getting 'type=GET, URL=/, and host=keep-alive'
Are these value correct??
I guess host value is not correct. What should be value of host?? "Localhost:8080" or "localhost"?
the problem with the above code is that it assumes that the first header is host, that is not always the case.
what you need to do is go through each line, separate it on ": " and ":" and check the first value, the header's name, where the header's name is host, that's what the host value should be.
p.s. keep-alive is a value of the connection header so definitely wrong
Nice tutorial. Thanks .... How can I get post variables, for example, when I submit a form.
why can't u make ur code readable
What do you mean? My code is readable, make sure u watch in 1080p.
Your code is readable, I don't think that was the issue. I'm viewing this tutorial in 1080p HD and it IS difficult to see. I personally code using a dark theme but I don't think the dark theme is great for video. You could maybe bump up your font size a couple of notches as well. Otherwise, good job!
Thank you Phil that's a good idea, I'll keep that in mind for my next video!
@@MatthiWare I was also having problems with this video untill i switched to 1080p and the screen with code is crystal clear.
Please activate the Arabic translation feature
Good video
Not very good tutorial you are not explaining most of the code .
Cant see shit
Thank you for your feedback, any ideas on how I can improve my videos?
Zoom in on the code. Im trying to watch on my phone. It seems interesting but I cant see
@@kunited9 This is a pretty old video, you should be able to watch it on a desktop screen. And I will keep this in mind for the future :)
@@MatthiWare Ok thanks for the reply cheers