Skip to content

Add support for configuring network interface/IP binding #10

@bryanchriswhite

Description

@bryanchriswhite

Description

Currently, PinShare binds to 0.0.0.0 (all interfaces) for the API server and uses localhost for internal health checks. This should be configurable to allow users to:

  • Bind to specific network interfaces
  • Choose between IPv4 and IPv6
  • Restrict API access to specific IPs

Affected Components

  • internal/api/main_api.go - API server binding
  • cmd/pinsharesvc/process.go - IPFS configuration (Addresses.API, Addresses.Gateway)
  • internal/app/app.go - Health check dial addresses

Proposed Solution

Add configuration options for:

  • api_bind_address - Address for API server to bind to (default: 0.0.0.0)
  • ipfs_bind_address - Address for IPFS to bind to (default: 127.0.0.1 for API/Gateway, 0.0.0.0 for Swarm)

References

This issue was identified during PR #3 code review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions