{"id":13644061,"url":"https://github.com/chronolaw/annotated_nginx","last_synced_at":"2025-05-13T10:40:26.427Z","repository":{"id":41258167,"uuid":"51183743","full_name":"chronolaw/annotated_nginx","owner":"chronolaw","description":"Annotated Nginx Source（中文）","archived":false,"fork":false,"pushed_at":"2024-09-11T13:28:46.000Z","size":13585,"stargazers_count":618,"open_issues_count":1,"forks_count":211,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-04-21T06:42:42.633Z","etag":null,"topics":["ngx-connection","ngx-event","ngx-http","ngx-stream","ngx-thread-pool"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chronolaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-06T01:02:47.000Z","updated_at":"2025-04-01T07:55:08.000Z","dependencies_parsed_at":"2023-02-03T03:46:06.217Z","dependency_job_id":"191dff9e-9eab-49b6-9398-47d2da0d8354","html_url":"https://github.com/chronolaw/annotated_nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronolaw%2Fannotated_nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronolaw%2Fannotated_nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronolaw%2Fannotated_nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronolaw%2Fannotated_nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chronolaw","download_url":"https://codeload.github.com/chronolaw/annotated_nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253924688,"owners_count":21985159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ngx-connection","ngx-event","ngx-http","ngx-stream","ngx-thread-pool"],"created_at":"2024-08-02T01:01:56.988Z","updated_at":"2025-05-13T10:40:26.411Z","avatar_url":"https://github.com/chronolaw.png","language":"C","funding_links":[],"categories":["C","Nginx学习资料快速链接"],"sub_categories":[],"readme":"# annotated_nginx\nAnnotated Nginx Source（中文）\n\n# 简介\nNginx源码分析，注解代码，帮助学习Nginx。\n\n* 1.10增加了动态模块、http2、reuseport。\n* 1.11.x里的stream模块的变动较大，完善了阶段处理。\n* 1.14增加了mirror模块，支持gRPC。\n* 1.15.10增加了range listen,指令“ssl_certificate”可从变量里加载证书。\n* 1.17.0不再支持OpenSSL 0.98,limit_rate/proxy_upload_rate支持变量。\n* 1.21.4支持内核TLS（kTLS），要求使用OpenSSL3.0，Linux内核高于4.17。\n* 1.21.5支持更新的PCRE2，但向上的封装接口不变。\n* 1.25.0实验性支持HTTP/3。\n\n请参考：\n* [《Nginx完全开发指南：使用C/C++/JavaScript/Lua》](https://item.jd.com/12536113.html)\n* [透视HTTP协议](https://time.geekbang.org/column/intro/189)\n* [C++实战笔记](https://time.geekbang.org/column/intro/309)\n* [ngx_cpp_dev](https://github.com/chronolaw/ngx_cpp_dev)\n* [ngx_ansic_dev](https://github.com/chronolaw/ngx_ansic_dev)\n* [openresty_dev](https://github.com/chronolaw/openresty_dev)\n* [favorite-nginx](https://github.com/chronolaw/favorite-nginx)\n* [ngx_google_perftools_profiler](https://github.com/chronolaw/ngx_google_perftools_profiler_module)\n* [Nginx on github](https://github.com/nginx/nginx)\n* [Angie](https://github.com/webserver-llc/angie)\n\n# 当前状态\nNginx 1.27.1\n\n# Git分支\n分支    |说明   |注释\n--------|-------|-----\nmaster  | Nginx开发版1.27.1|有\nmainline| Nginx开发版1.27.1|无\nstable  | Nginx稳定版1.26.0|无\n\n# 已注解\n\n### 源码目录快捷入口\n* [src](/nginx/src/) - 70%，nginx源码目录\n* [core](/nginx/src/core) - 90%，md5/sha1/crc等较简单的功能不关注\n* [event](/nginx/src/event) - 90%，只注解核心模块和epoll，select/kqueue/ssl等不关注\n* [http](/nginx/src/http) - 70%，少量modules目录里的具体功能模块有注释\n* [os/unix](/nginx/src/os/unix) - 80%，bsd/darwin/solaris等系统不关注\n* [stream](/nginx/src/stream) - 70%\n* [misc](/nginx/src/misc) - 100%\n\n#### UML图解\n[UML图示](/diagrams/readme.md)\n\n#### 部分关键源码（目录分类）\n\n###### core目录\n* [nginx.c](/nginx/src/core/nginx.c)\n* [ngx_conf_file.h](nginx/src/core/ngx_conf_file.h)\n* [ngx_module.h](nginx/src/core/ngx_module.h)\n* [ngx_module.c](nginx/src/core/ngx_module.c)\n* [ngx_connection.h](/nginx/src/core/ngx_connection.h)\n* [ngx_connection.c](/nginx/src/core/ngx_connection.c)\n* [ngx_thread_pool.h](/nginx/src/core/ngx_thread_pool.h)\n* [ngx_thread_pool.c](/nginx/src/core/ngx_thread_pool.c)\n* [ngx_palloc.c](/nginx/src/core/ngx_palloc.c)\n* [ngx_slab.c](/nginx/src/core/ngx_slab.c)\n* [ngx_log.c](/nginx/src/core/ngx_log.c)\n\n###### event目录\n* [ngx_event.h](/nginx/src/event/ngx_event.h)\n* [ngx_event.c](/nginx/src/event/ngx_event.c)\n* [ngx_event_accept.c](/nginx/src/event/ngx_event_accept.c)\n* [ngx_event_timer.c](/nginx/src/event/ngx_event_timer.c)\n* [ngx_epoll_module.c](/nginx/src/event/modules/ngx_epoll_module.c)\n\n###### http目录\n* [ngx_http.h](/nginx/src/http/ngx_http.h)\n* [ngx_http.c](/nginx/src/http/ngx_http.c)\n* [ngx_http_core_module.h](/nginx/src/http/ngx_http_core_module.h)\n* [ngx_http_core_module.c](/nginx/src/http/ngx_http_core_module.c)\n* [ngx_http_request.h](/nginx/src/http/ngx_http_request.h)\n* [ngx_http_request.c](/nginx/src/http/ngx_http_request.c)\n* [ngx_http_request_body.c](/nginx/src/http/ngx_http_request_body.c)\n* [ngx_http_header_filter_module.c](/nginx/src/http/ngx_http_header_filter_module.c)\n* [ngx_http_write_filter_module.c](/nginx/src/http/ngx_http_write_filter_module.c)\n\n###### http/modules目录\n* [ngx_http_limit_req_module.c](/nginx/src/http/modules/ngx_http_limit_req_module.c) 红黑树和共享内存的使用示例\n* [ngx_http_degradation_module.c](/nginx/src/http/modules/ngx_http_degradation_module.c)\n* [ngx_http_upstream_zone_module.c](/nginx/src/http/modules/ngx_http_upstream_zone_module.c)\n* [ngx_http_mirror_module.c](/nginx/src/http/modules/ngx_http_mirror_module.c)\n\n###### os/unix目录\n* [ngx_os.h](/nginx/src/os/unix/ngx_os.h)\n* [ngx_process.c](/nginx/src/os/unix/ngx_process.c)\n* [ngx_process_cycle.c](/nginx/src/os/unix/ngx_process_cycle.c)\n* [ngx_writev_chain.c](/nginx/src/os/unix/ngx_writev_chain.c)\n\n###### stream目录\n* [ngx_stream.h](/nginx/src/stream/ngx_stream.h)\n* [ngx_stream.c](/nginx/src/stream/ngx_stream.c)\n* [ngx_stream_core_module.c](/nginx/src/stream/ngx_stream_core_module.c)\n* [ngx_stream_handler.c](/nginx/src/stream/ngx_stream_handler.c)\n\n###### misc目录\n* [ngx_google_perftools_module.c](/nginx/src/misc/ngx_google_perftools_module.c)\n\n#### 部分关键源码（功能分类）\n\n###### 内存管理\n* [ngx_palloc.c](/nginx/src/core/ngx_palloc.c)\n* [ngx_slab.c](/nginx/src/core/ngx_slab.c)\n* [ngx_http_limit_req_module.c](/nginx/src/http/modules/ngx_http_limit_req_module.c) 红黑树和共享内存的使用示例\n* [ngx_http_degradation_module.c](/nginx/src/http/modules/ngx_http_degradation_module.c)\n* [ngx_http_upstream_zone_module.c](/nginx/src/http/modules/ngx_http_upstream_zone_module.c)\n\n###### 数据结构\n* [ngx_array.h](/nginx/src/core/ngx_array.h)\n* [ngx_list.h](/nginx/src/core/ngx_list.h)\n* [ngx_string.h](/nginx/src/core/ngx_string.h)\n* [ngx_buf.h](/nginx/src/core/ngx_buf.h)\n* [ngx_rbtree.h](/nginx/src/core/ngx_rbtree.h)\n* [ngx_http_limit_req_module.c](/nginx/src/http/modules/ngx_http_limit_req_module.c) 红黑树和共享内存的使用示例\n\n###### 进程机制\n* [nginx.c](/nginx/src/core/nginx.c)\n* [ngx_conf_file.h](nginx/src/core/ngx_conf_file.h)\n* [ngx_module.h](nginx/src/core/ngx_module.h)\n* [ngx_module.c](nginx/src/core/ngx_module.c)\n* [ngx_process.c](nginx/src/os/unix/ngx_process.c)\n* [ngx_process_cycle.c](nginx/src/os/unix/ngx_process_cycle.c)\n\n###### 事件机制\n* [ngx_connection.h](/nginx/src/core/ngx_connection.h)\n* [ngx_connection.c](/nginx/src/core/ngx_connection.c)\n* [ngx_event.h](/nginx/src/event/ngx_event.h)\n* [ngx_event.c](/nginx/src/event/ngx_event.c)\n* [ngx_event_accept.c](/nginx/src/event/ngx_event_accept.c)\n* [ngx_event_timer.c](/nginx/src/event/ngx_event_timer.c)\n* [ngx_epoll_module.c](/nginx/src/event/modules/ngx_epoll_module.c)\n\n###### 多线程机制\n* [ngx_event.h](/nginx/src/event/ngx_event.h)\n* [ngx_event.c](/nginx/src/event/ngx_event.c)\n* [ngx_thread_pool.h](/nginx/src/core/ngx_thread_pool.h)\n* [ngx_thread_pool.c](/nginx/src/core/ngx_thread_pool.c)\n\n###### tcp(stream)处理\n* [ngx_connection.h](/nginx/src/core/ngx_connection.h)\n* [ngx_connection.c](/nginx/src/core/ngx_connection.c)\n* [ngx_stream.h](/nginx/src/stream/ngx_stream.h)\n* [ngx_stream.c](/nginx/src/stream/ngx_stream.c)\n* [ngx_stream_core_module.c](/nginx/src/stream/ngx_stream_core_module.c)\n* [ngx_stream_handler.c](/nginx/src/stream/ngx_stream_handler.c)\n\n###### http处理\n* [ngx_connection.h](/nginx/src/core/ngx_connection.h)\n* [ngx_connection.c](/nginx/src/core/ngx_connection.c)\n* [ngx_http.h](/nginx/src/http/ngx_http.h)\n* [ngx_http.c](/nginx/src/http/ngx_http.c)\n* [ngx_http_core_module.h](/nginx/src/http/ngx_http_core_module.h)\n* [ngx_http_core_module.c](/nginx/src/http/ngx_http_core_module.c)\n* [ngx_http_request.h](/nginx/src/http/ngx_http_request.h)\n* [ngx_http_request.c](/nginx/src/http/ngx_http_request.c)\n* [ngx_http_request_body.c](/nginx/src/http/ngx_http_request_body.c)\n* [ngx_http_header_filter_module.c](/nginx/src/http/ngx_http_header_filter_module.c)\n* [ngx_http_write_filter_module.c](/nginx/src/http/ngx_http_write_filter_module.c)\n\n# 不注解\n\n* auto\n* mail\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronolaw%2Fannotated_nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchronolaw%2Fannotated_nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronolaw%2Fannotated_nginx/lists"}