Skip to content

Conversation

Copy link

Copilot AI commented Jul 20, 2025

This PR adds comprehensive manual pages for the DNS cache and SOCKS5 library functions, addressing the documentation gap for these core components.

Changes Made

DNS Cache Documentation (dns_cache.3)

  • Comprehensive manpage covering all functions from src/gwproxy/dns_cache.h
  • Documents 8 functions: gwp_dns_cache_init, gwp_dns_cache_free, gwp_dns_cache_housekeep, gwp_dns_cache_getent, gwp_dns_cache_putent, gwp_dns_cache_insert, gwp_dns_cache_entget_i4, gwp_dns_cache_entget_i6
  • Includes detailed descriptions of the cache entry structure and memory layout
  • Explains reference counting and thread-safety guarantees
  • Documents return values and error codes

SOCKS5 Documentation (socks5.3)

  • Comprehensive manpage covering all functions from src/gwproxy/socks5.h
  • Documents 7 functions: gwp_socks5_ctx_init, gwp_socks5_ctx_free, gwp_socks5_auth_reload, gwp_socks5_conn_alloc, gwp_socks5_conn_free, gwp_socks5_conn_handle_data, gwp_socks5_conn_cmd_connect_res
  • Covers all enumerations: connection states, address types, and reply codes
  • Explains the SOCKS5 state machine and protocol implementation
  • Documents data structures and their usage patterns

Individual Function Access

  • Created symlinks for each function following the existing pattern in the repository
  • Allows users to access documentation via man gwp_dns_cache_init or man gwp_socks5_ctx_init
  • Maintains consistency with existing manpage structure

Format and Style

  • Follows the same format as existing manpages in the repository
  • Uses section 3 (Library Functions Manual)
  • Includes proper headers, synopsis, descriptions, return values, and cross-references
  • Tested with man command to ensure proper formatting
  • Maintains consistent copyright and licensing information

Files Added

  • man/dns_cache.3 - Main DNS cache documentation
  • man/socks5.3 - Main SOCKS5 documentation
  • 8 symlinks for individual DNS cache functions
  • 7 symlinks for individual SOCKS5 functions

The manpages provide developers with comprehensive documentation for using these libraries, including function signatures, parameter descriptions, return values, usage notes, and examples of the data structures involved.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Create manpages for dns_cache.h and socks5.h. Create comprehensive manpages for dns_cache.h and socks5.h Jul 20, 2025
Copilot AI requested a review from ammarfaizi2 July 20, 2025 15:30
Copilot finished work on behalf of ammarfaizi2 July 20, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants