How to make go-ipfs use ws-star for punsub

go-ipfs not support wss

so i can’t use

i wanna make js-ipfs and go-ipfs can join same pubsub topic

anyone any other address can do this
or how can make go-ipfs support it

Hi, I believe it work if you connect js-ipfs to go-ipfs daemon directly.
At least I’m able to make them talk together. (I keep struggling with node running from go code though)

You need to add an address with websocket support in your daemon configuration.
This is the configuration I use for the daemon.
“API”: {
“HTTPHeaders”: {}
“Addresses”: {
“API”: “/ip4/”,
“Announce”: [],
“Gateway”: “/ip4/”,
“NoAnnounce”: [],
“Swarm”: [
“Bootstrap”: [
“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”: “10GB”
“Discovery”: {
“MDNS”: {
“Enabled”: true,
“Interval”: 10
“Experimental”: {
“FilestoreEnabled”: false,
“Libp2pStreamMounting”: false,
“P2pHttpProxy”: false,
“PreferTLS”: false,
“QUIC”: false,
“ShardingEnabled”: false,
“UrlstoreEnabled”: false
“Gateway”: {
“APICommands”: [],
“HTTPHeaders”: {
“Access-Control-Allow-Headers”: [
“Access-Control-Allow-Methods”: [
“Access-Control-Allow-Origin”: [
“NoFetch”: false,
“PathPrefixes”: [],
“RootRedirect”: “”,
“Writable”: false
“Identity”: {
“PeerID”: “Qmat51xLr51cLfFVYzHbT1miVBeMxvJzHs1uwUBcLNBE8e”
“Ipns”: {
“RecordLifetime”: “”,
“RepublishPeriod”: “”,
“ResolveCacheSize”: 128
“Mounts”: {
“FuseAllowOther”: false,
“IPFS”: “/ipfs”,
“IPNS”: “/ipns”
“Pubsub”: {
“DisableSigning”: false,
“Router”: “”,
“StrictSignatureVerification”: false
“Reprovider”: {
“Interval”: “12h”,
“Strategy”: “all”
“Routing”: {
“Type”: “dht”
“Swarm”: {
“AddrFilters”: null,
“ConnMgr”: {
“GracePeriod”: “20s”,
“HighWater”: 900,
“LowWater”: 600,
“Type”: “basic”
“DisableBandwidthMetrics”: false,
“DisableNatPortMap”: false,
“DisableRelay”: false,
“EnableAutoNATService”: false,
“EnableAutoRelay”: false,
“EnableRelayHop”: false

Note “/ip4/” in swarm list.
Also I start the daemon with --enable-pubsub-experiment

JS Side,
I configure the node and perform node.swarm.connect(/ip4/…/4003/ws/p2p/QmPeer)

I can then receive, pubsub messages from go to js and ‘vice-versa’.
A probably important thing to note too is that I just checked on localhost.

in real use case, they will not on same localhost
and every client is not know other peer address

so directly connect is not good choose for me