Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Others will look to you for stability, so hide when you bite your nails.


dovenet / Synchronet Javascript / Getting the BBS IP address

SubjectAuthor
* Getting the BBS IP addressCodefenix
`* Getting the BBS IP addressDigital Man
 `* Getting the BBS IP addressCodefenix
  `* Getting the BBS IP addressDigital Man
   `* Getting the BBS IP addressCodefenix
    `* Getting the BBS IP addressDigital Man
     `* Getting the BBS IP addressCodefenix
      `* Getting the BBS IP addressDigital Man
       `- Getting the BBS IP addressTracker1

1
Getting the BBS IP address

<64FB0C45.854.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=80&group=DOVE-Net.Synchronet_Javascript#80

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: All
Subject: Getting the BBS IP address
Message-ID: <64FB0C45.854.dove-net2012@conchaos.synchro.net>
Date: Fri, 8 Sep 2023 07:57:57 -0400
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.20a-Win32 master/c02f2513f Mar 5 2023 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20230908050438-0700 c1e0
WhenExported: 20230908081437-0700 c1e0
ExportedFrom: VERT sync-js 3919
WhenImported: 20230908075757-0400 c12c
WhenExported: 20230908080436-0400 c12c
ExportedFrom: CONCHAOS dove-net2012 854
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Fri, 8 Sep 2023 11:57 UTC

If I want to know the IP address of my own BBS, is this the simplest/best way to go about obtaining it?

resolve_ip(system.inet_addr)

Just making sure I'm not overlooking something simpler.

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07

....A critic is a legless man who teaches running.
---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

Getting the BBS IP address

<64FB7E00.3920.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=81&group=DOVE-Net.Synchronet_Javascript#81

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Codefenix
Subject: Getting the BBS IP address
Message-ID: <64FB7E00.3920.sync-js@vert.synchro.net>
Date: Fri, 8 Sep 2023 13:03:12 -0700
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <64FB0C45.854.dove-net2012@conchaos.synchro.net>
References: <64FB0C45.854.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/3e1aa12ec Sep 2 2023 GCC 12.2.0
X-FTN-CHRS: CP437 2
WhenImported: 20230908130312-0700 c1e0
WhenExported: 20230908141439-0700 c1e0
ExportedFrom: VERT sync-js 3920
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Fri, 8 Sep 2023 20:03 UTC

Re: Getting the BBS IP address
By: Codefenix to All on Fri Sep 08 2023 07:57 am

> If I want to know the IP address of my own BBS, is this the simplest/best
> way to go about obtaining it?
>
> resolve_ip(system.inet_addr)
>
> Just making sure I'm not overlooking something simpler.

server.interface_ip_address

Or (if you have multiple IP addresses), server.interface_ip_addr_list
--
digital man (rob)

Synchronet "Real Fact" #42:
Rob Swindell was laughed out of a FidoNet Net103 (OC, Calif.) meeting in 1992
Norco, CA WX: 92.6°F, 25.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Getting the BBS IP address

<64FDED44.856.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=82&group=DOVE-Net.Synchronet_Javascript#82

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Digital Man
Subject: Getting the BBS IP address
Message-ID: <64FDED44.856.dove-net2012@conchaos.synchro.net>
Date: Sun, 10 Sep 2023 12:22:28 -0400
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <64FB7E00.3920.sync-js@vert.synchro.net>
References: <64FB7E00.3920.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.20a-Win32 master/c02f2513f Mar 5 2023 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20230910100455-0700 c1e0
WhenExported: 20230910141437-0700 c1e0
ExportedFrom: VERT sync-js 3921
WhenImported: 20230910122228-0400 c12c
WhenExported: 20230910130453-0400 c12c
ExportedFrom: CONCHAOS dove-net2012 856
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Sun, 10 Sep 2023 16:22 UTC

Re: Getting the BBS IP address
By: Digital Man to Codefenix on Fri Sep 08 2023 01:03 pm

DM> server.interface_ip_address

Isn't that deprecated?

DM> Or (if you have multiple IP addresses), server.interface_ip_addr_list

I just have one, so I assume I would do: server.interface_ip_addr_list[0]

When I try that though, it returns 0.0.0.

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07

....Interchangable devices won`t.
---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

Getting the BBS IP address

<64FE3A09.3922.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=83&group=DOVE-Net.Synchronet_Javascript#83

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Codefenix
Subject: Getting the BBS IP address
Message-ID: <64FE3A09.3922.sync-js@vert.synchro.net>
Date: Sun, 10 Sep 2023 14:50:01 -0700
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <64FDED44.856.dove-net2012@conchaos.synchro.net>
References: <64FDED44.856.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/3e1aa12ec Sep 2 2023 GCC 12.2.0
X-FTN-CHRS: CP437 2
WhenImported: 20230910145001-0700 c1e0
WhenExported: 20230910201439-0700 c1e0
ExportedFrom: VERT sync-js 3922
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Sun, 10 Sep 2023 21:50 UTC

Re: Getting the BBS IP address
By: Codefenix to Digital Man on Sun Sep 10 2023 12:22 pm

> Re: Getting the BBS IP address
> By: Digital Man to Codefenix on Fri Sep 08 2023 01:03 pm
>
> DM> server.interface_ip_address
>
> Isn't that deprecated?

It still works and I have no plans to remove it.

> DM> Or (if you have multiple IP addresses), server.interface_ip_addr_list
>
> I just have one, so I assume I would do: server.interface_ip_addr_list[0]
>
> When I try that though, it returns 0.0.0.

And that would be correct if your BBS is only listening on IPv4 "any". I would expect the IPv6 "any" interface address (::) to be listed in that array too, but default.

A better idea is probably is to use client.socket.local_ip_address to get the currently connected/used server IP address.
--
digital man (rob)

Synchronet/BBS Terminology Definition #50:
LF = Line Feed (ASCII 10, Ctrl-J)
Norco, CA WX: 93.6°F, 37.0% humidity, 4 mph SE wind, 0.01 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Getting the BBS IP address

<64FF5CA6.858.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=84&group=DOVE-Net.Synchronet_Javascript#84

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Digital Man
Subject: Getting the BBS IP address
Message-ID: <64FF5CA6.858.dove-net2012@conchaos.synchro.net>
Date: Mon, 11 Sep 2023 14:29:58 -0400
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <64FE3A09.3922.sync-js@vert.synchro.net>
References: <64FE3A09.3922.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.20a-Win32 master/c02f2513f Mar 5 2023 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20230911120500-0700 c1e0
WhenExported: 20230911141441-0700 c1e0
ExportedFrom: VERT sync-js 3923
WhenImported: 20230911142958-0400 c12c
WhenExported: 20230911150458-0400 c12c
ExportedFrom: CONCHAOS dove-net2012 858
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Mon, 11 Sep 2023 18:29 UTC

Re: Getting the BBS IP address
By: Digital Man to Codefenix on Sun Sep 10 2023 02:50 pm

DM> A better idea is probably is to use client.socket.local_ip_address to get
DM> the currently connected/used server IP address.

Same outcome as before, unfortunately. Getting 0.0.0.0

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07

....The God's play games with men as balls.
---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

Getting the BBS IP address

<64FFA412.3924.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=85&group=DOVE-Net.Synchronet_Javascript#85

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Codefenix
Subject: Getting the BBS IP address
Message-ID: <64FFA412.3924.sync-js@vert.synchro.net>
Date: Mon, 11 Sep 2023 16:34:42 -0700
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <64FF5CA6.858.dove-net2012@conchaos.synchro.net>
References: <64FF5CA6.858.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/3e1aa12ec Sep 2 2023 GCC 12.2.0
X-FTN-CHRS: CP437 2
WhenImported: 20230911163442-0700 c1e0
WhenExported: 20230911201438-0700 c1e0
ExportedFrom: VERT sync-js 3924
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Mon, 11 Sep 2023 23:34 UTC

Re: Getting the BBS IP address
By: Codefenix to Digital Man on Mon Sep 11 2023 02:29 pm

> Re: Getting the BBS IP address
> By: Digital Man to Codefenix on Sun Sep 10 2023 02:50 pm
>
> DM> A better idea is probably is to use client.socket.local_ip_address to
> DM> get the currently connected/used server IP address.
>
> Same outcome as before, unfortunately. Getting 0.0.0.0

Is there a client connected? It's certainly not 0.0.0.0 for me:
;eval
Parameter(s): client.socket.local_ip_address
Result (string): 71.95.196.36
--
digital man (rob)

Sling Blade quote #11:
Doyle Hargraves (to Karl): What in the hell you doin' with that hammer?
Norco, CA WX: 87.7°F, 45.0% humidity, 8 mph S wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Getting the BBS IP address

<6500619D.860.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=86&group=DOVE-Net.Synchronet_Javascript#86

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Digital Man
Subject: Getting the BBS IP address
Message-ID: <6500619D.860.dove-net2012@conchaos.synchro.net>
Date: Tue, 12 Sep 2023 09:03:25 -0400
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <64FFA412.3924.sync-js@vert.synchro.net>
References: <64FFA412.3924.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.20a-Win32 master/c02f2513f Mar 5 2023 MSC 1929
X-FTN-CHRS: CP437 2
WhenImported: 20230912060917-0700 c1e0
WhenExported: 20230912081440-0700 c1e0
ExportedFrom: VERT sync-js 3925
WhenImported: 20230912090325-0400 c12c
WhenExported: 20230912090914-0400 c12c
ExportedFrom: CONCHAOS dove-net2012 860
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Tue, 12 Sep 2023 13:03 UTC

Re: Getting the BBS IP address
By: Digital Man to Codefenix on Mon Sep 11 2023 04:34 pm

DM> Is there a client connected? It's certainly not 0.0.0.0 for me:

Yes, mine. :) I'm running a script containing the client.socket.local_ip_address while logged into the BBS.

DM> ;eval
DM> Parameter(s): client.socket.local_ip_address
DM> Result (string): 71.95.196.36

Interesting. I get a different result when I call client.socket.local_ip_address that way as opposed to calling it within a script.

;EVAL
Parameter(s): client.socket.local_ip_address
Result (string): 192.168.1.9

Also, it's returning the behind-the-router IP for me, rather than the outward-facing IP, which it seems like it's supposed to do given your output.

|01<|09co|03d|11e|15ƒ|11e|03n|09ix|01>|07

....A pnp transistor will be an npn.
---
■ Synchronet ■ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-

Getting the BBS IP address

<6500B5AF.3926.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=87&group=DOVE-Net.Synchronet_Javascript#87

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Codefenix
Subject: Getting the BBS IP address
Message-ID: <6500B5AF.3926.sync-js@vert.synchro.net>
Date: Tue, 12 Sep 2023 12:02:07 -0700
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6500619D.860.dove-net2012@conchaos.synchro.net>
References: <6500619D.860.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.20a-Linux master/3e1aa12ec Sep 2 2023 GCC 12.2.0
X-FTN-CHRS: CP437 2
WhenImported: 20230912120207-0700 c1e0
WhenExported: 20230912141440-0700 c1e0
ExportedFrom: VERT sync-js 3926
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Tue, 12 Sep 2023 19:02 UTC

Re: Getting the BBS IP address
By: Codefenix to Digital Man on Tue Sep 12 2023 09:03 am

> Re: Getting the BBS IP address
> By: Digital Man to Codefenix on Mon Sep 11 2023 04:34 pm
>
> DM> Is there a client connected? It's certainly not 0.0.0.0 for me:
>
> Yes, mine. :) I'm running a script containing the
> client.socket.local_ip_address while logged into the BBS.

Running a script how? What's in the script?

I created exec/test.js containing a single line:
print(client.socket.local_ip_address);

And then when I run that script from the BBS, I get the IP address I expect:
;exec ?test.js
71.95.196.36

> DM> ;eval
> DM> Parameter(s): client.socket.local_ip_address
> DM> Result (string): 71.95.196.36
>
> Interesting. I get a different result when I call
> client.socket.local_ip_address that way as opposed to calling it within a
> script.

I do not.

> ;EVAL
> Parameter(s): client.socket.local_ip_address
> Result (string): 192.168.1.9
>
> Also, it's returning the behind-the-router IP for me, rather than the
> outward-facing IP, which it seems like it's supposed to do given your
> output.

My servers aren't behind NAT, so that's expected. I guess if you want to find the *public* IP address associated with your hostname and your server is behind a NAT, then I guess the method you originally provided is (only?) way.
--
digital man (rob)

Rush quote #47:
All of us get lost in the darkness, dreamers learn to steer by the stars
Norco, CA WX: 83.4°F, 45.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Getting the BBS IP address

<6504AFEB.968.dove-syncjs@roughneckbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=88&group=DOVE-Net.Synchronet_Javascript#88

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: tracker1@VERT/TRN (Tracker1)
To: Digital Man
Subject: Getting the BBS IP address
Message-ID: <6504AFEB.968.dove-syncjs@roughneckbbs.com>
Date: Fri, 15 Sep 2023 19:26:35 +0000
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Roughneck BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <6500B5AF.3926.sync-js@vert.synchro.net>
References: <6500B5AF.3926.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Linux HEAD/a5de4b9 Apr 25 2023 GCC 10.2.1
X-FTN-CHRS: CP437 2
WhenImported: 20230915151629-0700 c1e0
WhenExported: 20230915201446-0700 c1e0
ExportedFrom: VERT sync-js 3927
WhenImported: 20230915192635Z 0000
WhenExported: 20230915221632Z 0000
ExportedFrom: TRN dove-syncjs 968
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Tracker1 - Fri, 15 Sep 2023 19:26 UTC

Re: Getting the BBS IP address
By: Digital Man to Codefenix on Tue Sep 12 2023 12:02:07

DM> My servers aren't behind NAT, so that's expected. I guess if you want to
DM> find the *public* IP address associated with your hostname and your server
DM> is behind a NAT, then I guess the method you originally provided is
DM> (only?) way.

IP Only
http://ipv4.bbs.land/
http://ipv6.bbs.land/

Split on comma, second part is IP
http://ip4.me/api/
http://ip6.me/api/

The ip(4|6) I found while looking for such a service... the bbs.land ones are mine... Mostly in preparation for setting up some of the domains I have for BBS related dyndns support.


--
Michael J. Ryan
+o roughneckbbs.com
tracker1@roughneckbbs.com

---
■ Synchronet ■ Roughneck BBS - roughneckbbs.com


dovenet / Synchronet Javascript / Getting the BBS IP address

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor