HTTP代理服务器

发布于 2024-08-11 07:45:59 字数 102 浏览 3 评论 0原文

我开始开发一个用 C 语言编写的非常基本的 HTTP 代理服务器(编辑: 只是转发我的请求)。此时我很难理解如何继续。

任何帮助都会有益的。

I am beginning work on a very basic HTTP proxy server written in C (Edit: something that just forwards my requests). At this point I am having difficulty in understanding how to proceed.

Any help would be beneficial.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别再吹冷风 2024-08-18 07:45:59

查看micro_proxy。它仅用 260 行 C 代码就实现了 HTTP/HTTPS 代理的所有基本功能。

另一个非常简单的实现可以在Proxy

Take a look at micro_proxy. It implements all the basic features of an HTTP/HTTPS proxy, in only 260 lines of C code.

Another very simple implementation can be found at Proxy.

时间海 2024-08-18 07:45:59

什么协议的代理服务器?在您知道这一点之前,开始编码并不是最有益的下一步。

在您决定要实现的协议之后,您(可能)需要阅读套接字 API。

完成后,需要采取三种主要路线:使用基于轮询/选择的循环、分叉每个会话进程或使用线程来整理数据。

A proxy server for what protocol? Before you know that, starting coding is not the most beneficial next step.

After you've decided on what protocol to implement, you (probably) need to read up on the sockets API.

Once that's done, there's three major routes to go, using a poll/select-based loop, forking off per-session processes or using threads to shuffle data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文