diff --git a/connectd/connectd.c b/connectd/connectd.c index 3224efdf6..4bd8f9200 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -1257,42 +1257,6 @@ setup_listeners(const tal_t *ctx, return NULL; } - /* If we want websockets to match IPv4/v6, set it up now. */ - if (daemon->websocket_port) { - bool announced_some = false; - struct wireaddr_internal addr; - /* Only consider bindings added before this! */ - size_t num_nonws_listens = tal_count(listen_fds); - - for (size_t i = 0; i < num_nonws_listens; i++) { - /* Ignore UNIX sockets */ - if (listen_fds[i]->wi.itype != ADDR_INTERNAL_WIREADDR) - continue; - - /* Override with websocket port */ - addr = listen_fds[i]->wi; - addr.u.wireaddr.is_websocket = true; - addr.u.wireaddr.wireaddr.port = daemon->websocket_port; - - /* We set mayfail on all but the first websocket; - * it's quite common to have multple overlapping - * addresses. */ - lfd = handle_wireaddr_listen(ctx, &addr, announced_some, - errstr); - if (!lfd) - continue; - - announced_some = true; - tal_arr_expand(&listen_fds, tal_steal(listen_fds, lfd)); - } - - /* If none of those was possible, it's a configuration error? */ - if (tal_count(listen_fds) == num_nonws_listens) { - *errstr = "Cannot listen on websocket: not listening on any IPv4/6 addresses"; - return NULL; - } - } - /* FIXME: Websocket over Tor (difficult for autotor, since we need * to use the same onion addr!) */ @@ -1403,7 +1367,6 @@ static void connect_init(struct daemon *daemon, const u8 *msg) &tor_password, &daemon->timeout_secs, &daemon->websocket_helper, - &daemon->websocket_port, &daemon->announce_websocket, &daemon->dev_fast_gossip, &dev_disconnect, diff --git a/connectd/connectd_wire.csv b/connectd/connectd_wire.csv index db895d6c5..f5fb279e5 100644 --- a/connectd/connectd_wire.csv +++ b/connectd/connectd_wire.csv @@ -20,7 +20,6 @@ msgdata,connectd_init,use_dns,bool, msgdata,connectd_init,tor_password,wirestring, msgdata,connectd_init,timeout_secs,u32, msgdata,connectd_init,websocket_helper,wirestring, -msgdata,connectd_init,websocket_port,u16, msgdata,connectd_init,announce_websocket,bool, msgdata,connectd_init,dev_fast_gossip,bool, # If this is set, then fd 5 is dev_disconnect_fd. diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json index 8325bf061..58fd4af3d 100644 --- a/contrib/msggen/msggen/schema.json +++ b/contrib/msggen/msggen/schema.json @@ -14381,28 +14381,6 @@ } } }, - "experimental-websocket-port": { - "type": "object", - "additionalProperties": false, - "required": [ - "value_int", - "source" - ], - "properties": { - "value_int": { - "type": "u32", - "description": [ - "Field from config or cmdline, or default." - ] - }, - "source": { - "type": "string", - "description": [ - "Source of configuration setting." - ] - } - } - }, "experimental-peer-storage": { "added": "v23.02", "type": "object", @@ -15710,16 +15688,6 @@ "`experimental-shutdown-wrong-funding` field from config or cmdline, or default." ] }, - "experimental-websocket-port": { - "deprecated": [ - "v23.08", - "v24.02" - ], - "type": "u16", - "description": [ - "`experimental-websocket-port` field from config or cmdline, or default." - ] - }, "experimental-peer-storage": { "deprecated": [ "v23.08", diff --git a/doc/developers-guide/deprecations.md b/doc/developers-guide/deprecations.md index dd6f3cc9d..4f487b5b0 100644 --- a/doc/developers-guide/deprecations.md +++ b/doc/developers-guide/deprecations.md @@ -15,7 +15,6 @@ hidden: false | bind-addr.torv3 | Config | v23.08 | v24.08 | `announce-addr` makes more sense for Tor addresses | | addr.torv3 | Config | v23.08 | v24.08 | `announce-addr` makes more sense for Tor addresses | | addr.socket | Config | v23.08 | v24.08 | `bind-addr` makes more sense for local sockets since we cannot announce them | -| experimental-websocket-port | Config | v23.08 | v23.08 | Use `bind=ws:` to specify websocket ports on a per-port basis | | announce-addr-dns | Config | v23.08 | v24.08 | Use `bind-addr=dns:` to specify DNS announcements on a per-address basis | | rest-port.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-port` to `clnrest-port` (added in v23.11) | | rest-protocol.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-protocol` to `clnrest-protocol` (added in v23.11) | diff --git a/doc/getting-started/getting-started/configuration.md b/doc/getting-started/getting-started/configuration.md index fc1a9317d..3afc7d013 100644 --- a/doc/getting-started/getting-started/configuration.md +++ b/doc/getting-started/getting-started/configuration.md @@ -514,7 +514,3 @@ A build _with_ `--enable-experimental-features` flag hard-codes some of below op - **experimental-dual-fund** Specifying this enables support for the dual funding protocol ([bolt](https://github.com/lightning/bolts) #851), allowing both parties to contribute funds to a channel. The decision about whether to add funds or not to a proposed channel is handled automatically by a plugin that implements the appropriate logic for your needs. The default behavior is to not contribute funds. - -- **experimental-websocket-port**=_PORT_ - - Specifying this enables support for accepting incoming WebSocket connections on that port, on any IPv4 and IPv6 addresses you listen to ([bolt](https://github.com/lightning/bolts) #891). The normal protocol is expected to be sent over WebSocket binary frames once the connection is upgraded. diff --git a/doc/lightningd-config.5.md b/doc/lightningd-config.5.md index 5c6132705..b3c045b0d 100644 --- a/doc/lightningd-config.5.md +++ b/doc/lightningd-config.5.md @@ -763,16 +763,6 @@ The operations will be bundled into a single transaction. The channel will remai active while awaiting splice confirmation, however you can only spend the smaller of the prior channel balance and the new one. -* **experimental-websocket-port**=*PORT* (deprecated in v23.08) - - Specifying this enables support for accepting incoming WebSocket -connections on that port, on any IPv4 and IPv6 addresses you listen -to ([bolt][bolt] #891). The normal protocol is expected to be sent over WebSocket binary -frames once the connection is upgraded. - - You should use `bind-addr=ws::` instead to create a WebSocket listening port. - see [Networking options](getting-started/getting-started/configuration.md#networking-options) - * **experimental-peer-storage** Specifying this option means we will store up to 64k of encrypted diff --git a/doc/schemas/lightning-listconfigs.json b/doc/schemas/lightning-listconfigs.json index c541788bb..2f0406f28 100644 --- a/doc/schemas/lightning-listconfigs.json +++ b/doc/schemas/lightning-listconfigs.json @@ -613,28 +613,6 @@ } } }, - "experimental-websocket-port": { - "type": "object", - "additionalProperties": false, - "required": [ - "value_int", - "source" - ], - "properties": { - "value_int": { - "type": "u32", - "description": [ - "Field from config or cmdline, or default." - ] - }, - "source": { - "type": "string", - "description": [ - "Source of configuration setting." - ] - } - } - }, "experimental-peer-storage": { "added": "v23.02", "type": "object", @@ -1942,16 +1920,6 @@ "`experimental-shutdown-wrong-funding` field from config or cmdline, or default." ] }, - "experimental-websocket-port": { - "deprecated": [ - "v23.08", - "v24.02" - ], - "type": "u16", - "description": [ - "`experimental-websocket-port` field from config or cmdline, or default." - ] - }, "experimental-peer-storage": { "deprecated": [ "v23.08", diff --git a/lightningd/connect_control.c b/lightningd/connect_control.c index 88688c1eb..31662b540 100644 --- a/lightningd/connect_control.c +++ b/lightningd/connect_control.c @@ -753,7 +753,6 @@ int connectd_init(struct lightningd *ld) ld->tor_service_password ? ld->tor_service_password : "", ld->config.connection_timeout_secs, websocket_helper_path, - ld->websocket_port, !ld->deprecated_ok, ld->dev_fast_gossip, ld->dev_disconnect_fd >= 0, diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 95b5807c8..4fe9d1a16 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -271,7 +271,6 @@ static struct lightningd *new_lightningd(const tal_t *ctx) ld->always_use_proxy = false; ld->pure_tor_setup = false; ld->tor_service_password = NULL; - ld->websocket_port = 0; ld->deprecated_ok = true; /*~ This is initialized later, but the plugin loop examines this, diff --git a/lightningd/lightningd.h b/lightningd/lightningd.h index 8f2ddde97..10474ae08 100644 --- a/lightningd/lightningd.h +++ b/lightningd/lightningd.h @@ -391,9 +391,6 @@ struct lightningd { * since we otherwise would outright reject them. */ u64 *accept_extra_tlv_types; - /* EXPERIMENTAL: websocket port if non-zero */ - u16 websocket_port; - /* --experimental-upgrade-protocol */ bool experimental_upgrade_protocol; diff --git a/lightningd/options.c b/lightningd/options.c index 0db827246..a661e0c95 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -1195,25 +1195,6 @@ static char *opt_set_wumbo(struct lightningd *ld) return NULL; } -static char *opt_set_websocket_port(const char *arg, struct lightningd *ld) -{ - u32 port COMPILER_WANTS_INIT("9.3.0 -O2"); - char *err; - - if (!opt_deprecated_ok(ld, "experimental-websocket-port", NULL, - "v23.08", "v23.08")) - return "--experimental-websocket-port been deprecated, use --bind-addr=ws:..."; - - err = opt_set_u32(arg, &port); - if (err) - return err; - - ld->websocket_port = port; - if (ld->websocket_port != port) - return tal_fmt(tmpctx, "'%s' is out of range", arg); - return NULL; -} - static char *opt_set_dual_fund(struct lightningd *ld) { /* Dual funding implies static remotkey */ @@ -1630,9 +1611,6 @@ static void register_opts(struct lightningd *ld) "--subdaemon=hsmd:remote_signer " "would use a hypothetical remote signing subdaemon."); - clnopt_witharg("--experimental-websocket-port", OPT_SHOWINT, - opt_set_websocket_port, NULL, - ld, opt_hidden); opt_register_noarg("--experimental-upgrade-protocol", opt_set_bool, &ld->experimental_upgrade_protocol, "experimental: allow channel types to be upgraded on reconnect"); @@ -2120,11 +2098,6 @@ void add_config_deprecated(struct lightningd *ld, json_add_opt_disable_plugins(response, ld->plugins); } else if (opt->cb_arg == (void *)opt_force_feerates) { answer = fmt_force_feerates(name0, ld->force_feerates); - } else if (opt->cb_arg == (void *)opt_set_websocket_port) { - if (ld->websocket_port) - json_add_u32(response, name0, - ld->websocket_port); - return; } else if (opt->cb_arg == (void *)opt_set_db_upgrade) { if (ld->db_upgrade_ok) json_add_bool(response, name0, @@ -2168,7 +2141,6 @@ bool is_known_opt_cb_arg(char *(*cb_arg)(const char *, void *)) || cb_arg == (void *)opt_add_proxy_addr || cb_arg == (void *)opt_force_feerates || cb_arg == (void *)opt_set_accept_extra_tlv_types - || cb_arg == (void *)opt_set_websocket_port || cb_arg == (void *)opt_add_plugin || cb_arg == (void *)opt_add_plugin_dir || cb_arg == (void *)opt_important_plugin