ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.15k stars 3.01k forks source link

TCP Tunnel 4001 to a remote VPS configuration #10550

Closed bn-c closed 2 weeks ago

bn-c commented 2 weeks ago

Checklist

Description

Here is my current setup, and configuration for Kubo.

I am running into an issue where my Wan DHT has 0 entries ipfs stats dht. My guess is ipfs doesn't record peers found thorugh 127.0.0.1? Is there a way to re-configure my node to allow for better content discovery and provides? If not this is a feature request.

image

{
    "API": {
        "HTTPHeaders": {}
    },
    "Addresses": {
        "API": "/ip4/127.0.0.1/tcp/5001",
        "Announce": [
            "/ip4/<vps-ip>/tcp/4001",
            "/ip6/<vps-ip>/tcp/4001"
        ],
        "AppendAnnounce": [],
        "Gateway": "/ip4/127.0.0.1/tcp/8080",
        "NoAnnounce": [],
        "Swarm": [
            "/ip4/127.0.0.1/tcp/4001",
            "/ip6/::1/tcp/4001"
        ]
    },
    "AutoNAT": {},
    "Bootstrap": [
        "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
        "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
        "/ip4/104.131.131.82/udp/4001/quic-v1/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
        "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
        "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
        "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb"
    ],
    "DNS": {
        "Resolvers": {}
    },
    "Datastore": {
        "BloomFilterSize": 0,
        "GCPeriod": "1h",
        "HashOnRead": false,
        "Spec": {
            "mounts": [
                {
                    "child": {
                        "path": "blocks",
                        "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
                        "sync": true,
                        "type": "flatfs"
                    },
                    "mountpoint": "/blocks",
                    "prefix": "flatfs.datastore",
                    "type": "measure"
                },
                {
                    "child": {
                        "compression": "none",
                        "path": "datastore",
                        "type": "levelds"
                    },
                    "mountpoint": "/",
                    "prefix": "leveldb.datastore",
                    "type": "measure"
                }
            ],
            "type": "mount"
        },
        "StorageGCWatermark": 90,
        "StorageMax": "60GB"
    },
    "Discovery": {
        "MDNS": {
            "Enabled": true
        }
    },
    "Experimental": {
        "FilestoreEnabled": false,
        "Libp2pStreamMounting": false,
        "OptimisticProvide": false,
        "OptimisticProvideJobsPoolSize": 0,
        "P2pHttpProxy": false,
        "StrategicProviding": false,
        "UrlstoreEnabled": false
    },
    "Gateway": {
        "DeserializedResponses": null,
        "DisableHTMLErrors": null,
        "ExposeRoutingAPI": null,
        "HTTPHeaders": {},
        "NoDNSLink": false,
        "NoFetch": false,
        "PublicGateways": null,
        "RootRedirect": ""
    },
    "Identity": {
        "PeerID": "12D3Koo..."
    },
    "Import": {
        "CidVersion": 1,
        "HashFunction": "sha2-256",
        "UnixFSChunker": "size-1048576",
        "UnixFSRawLeaves": true
    },
    "Internal": {},
    "Ipns": {
        "RecordLifetime": "",
        "RepublishPeriod": "",
        "ResolveCacheSize": 128
    },
    "Migration": {
        "DownloadSources": [],
        "Keep": ""
    },
    "Mounts": {
        "FuseAllowOther": false,
        "IPFS": "/ipfs",
        "IPNS": "/ipns"
    },
    "Peering": {
        "Peers": null
    },
    "Pinning": {
        "RemoteServices": {}
    },
    "Plugins": {
        "Plugins": null
    },
    "Pubsub": {
        "DisableSigning": false,
        "Router": ""
    },
    "Reprovider": {
        "Interval": "2h0m0s",
        "Strategy": "all"
    },
    "Routing": {
        "AcceleratedDHTClient": true,
        "LoopbackAddressesOnLanDHT": false,
        "Methods": null,
        "Routers": null,
        "Type": "dhtserver"
    },
    "Swarm": {
        "AddrFilters": null,
        "ConnMgr": {
            "GracePeriod": "20s",
            "HighWater": 6000,
            "LowWater": 2000,
            "Type": "basic"
        },
        "DisableBandwidthMetrics": false,
        "DisableNatPortMap": false,
        "RelayClient": {},
        "RelayService": {},
        "ResourceMgr": {},
        "Transports": {
            "Multiplexers": {},
            "Network": {},
            "Security": {}
        }
    }
}
bn-c commented 2 weeks ago

I realized that outgoing traffic still using local network... Solved this by using a vpn