gaurishhs / elysia-ip

Get Client IP Address in Elysia
MIT License
50 stars 10 forks source link

How to retrieve ONLY IPv4 address #21

Closed cholasimmons closed 4 months ago

cholasimmons commented 4 months ago

Does this plugin have a function to return only the IPv4 address without the ffff prefix?

gaurishhs commented 4 months ago

Which runtime are you using?

cholasimmons commented 4 months ago

I'm on Bun 1.1.8 @gaurishhs

gaurishhs commented 4 months ago

You should ask this on the Bun repo then since we just use the IP Bun provides. I don't think so it is possible because Bun provides the IP client is using as default. If your client is using IPv6 it will give IPv6 same for IPv4

cholasimmons commented 4 months ago

Makes sense. Thanks.