Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

Update public IP server endpoints#30

Merged
HackingGate merged 3 commits intomasterfrom
copilot/update-public-ip-servers
Dec 13, 2025
Merged

Update public IP server endpoints#30
HackingGate merged 3 commits intomasterfrom
copilot/update-public-ip-servers

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 13, 2025

Update Public IP Servers

  • Research and identify reliable public IP services to replace/update
  • Update PublicIPAPIURLs.swift with new/updated server endpoints
    • Removed deprecated services (ipv6test, seeip, whatismyipaddress, ipecho)
    • Added modern reliable services (ifconfig.me, my-ip.io, ipinfo.io)
    • Kept well-maintained services (icanhazip, ipify, ident, amazonaws)
  • Update tests to match new server list
  • Update README with new service list
  • Verify the changes compile
  • Merged master branch (includes GitHub Actions artifact updates)
  • Request code review (passed with no issues)
  • Run security checks (passed with no issues)

Summary

Updated public IP server endpoints to more reliable and modern services. The changes include:

Removed: ipv6test, seeip, whatismyipaddress, ipecho
Added: ifconfig.me, my-ip.io, ipinfo.io
Kept: icanhazip, ipify, ident.me, amazonaws

Merged latest master branch changes (GitHub Actions artifact version updates).

All changes maintain backward compatibility with the existing API structure. Tests have been updated accordingly.

Original prompt

This section details on the original issue you should resolve

<issue_title>Update public IP servers</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: HackingGate <8541644+HackingGate@users.noreply.github.com>
Copilot AI changed the title [WIP] Update public IP servers Update public IP server endpoints Dec 13, 2025
Copilot AI requested a review from HackingGate December 13, 2025 16:40
@HackingGate
Copy link
Copy Markdown
Owner

@copilot rebase master branch

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 13, 2025

@copilot rebase master branch

Merged master branch into this PR. The merge includes the updated GitHub Actions artifact versions (upload-artifact@v6 and download-artifact@v7). Build verified successfully. (07b5ad0)

@github-actions
Copy link
Copy Markdown

Coverage after merging copilot/update-public-ip-servers into master

72.73%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
Sources
   PublicIPAPI.swift65.31%100%75%64.44%20–21, 24–25, 28–29, 41–50
   SwiftPublicIP.swift82.35%100%66.67%85.71%21
Tests
   LinuxMain.swift100%100%100%100%
Tests/SwiftPublicIPTests
   SwiftPublicIPTests.swift72.56%100%69.23%73.60%104–108, 110–114, 116–120, 122–126, 128–132, 152–156, 17

1 similar comment
@github-actions
Copy link
Copy Markdown

Coverage after merging copilot/update-public-ip-servers into master

72.73%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
Sources
   PublicIPAPI.swift65.31%100%75%64.44%20–21, 24–25, 28–29, 41–50
   SwiftPublicIP.swift82.35%100%66.67%85.71%21
Tests
   LinuxMain.swift100%100%100%100%
Tests/SwiftPublicIPTests
   SwiftPublicIPTests.swift72.56%100%69.23%73.60%104–108, 110–114, 116–120, 122–126, 128–132, 152–156, 17

@HackingGate HackingGate marked this pull request as ready for review December 13, 2025 16:53
Copilot AI review requested due to automatic review settings December 13, 2025 16:53
@HackingGate HackingGate merged commit 4bd8d3f into master Dec 13, 2025
8 of 10 checks passed
@HackingGate HackingGate deleted the copilot/update-public-ip-servers branch December 13, 2025 16:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the public IP server endpoints by replacing deprecated services with more reliable alternatives. The changes update the API service list, corresponding tests, and documentation to reflect current best practices for IP address lookup services.

  • Removes 4 deprecated services (ipv6test, seeip, whatismyipaddress, ipecho) and adds 3 modern services (ifconfig.me, my-ip.io, ipinfo.io)
  • Updates all test functions to match the new service endpoints
  • Updates README documentation with current service list and links

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
Sources/PublicIPAPIURLs.swift Updates enum cases across Hybrid, IPv4, and IPv6 categories with new service endpoints
Tests/SwiftPublicIPTests/SwiftPublicIPTests.swift Updates test functions and test registry to match new service endpoints
README.md Updates service list documentation with links to new service providers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

case seeip = "https://ip.seeip.org"
case whatismyipaddress = "https://bot.whatismyipaddress.com"
case ipify = "https://api.ipify.org"
case ifconfigMe = "https://ifconfig.me/ip"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum case name "ifconfigMe" uses an inconsistent naming convention. The other enum cases in this file use all lowercase names (icanhazip, ipify, ident, amazonaws, ipinfo), but this one uses camelCase with a capital 'M'. For consistency with the rest of the codebase, consider renaming this to "ifconfigme" (all lowercase).

Copilot uses AI. Check for mistakes.
Comment on lines +40 to 43
func test_hybrid_ifconfigMe() {
let exp = expectation(description: "\(#function)\(#line)")
testPublicIP(PublicIPAPIURLs.Hybrid.seeip.rawValue, exp)
testPublicIP(PublicIPAPIURLs.Hybrid.ifconfigMe.rawValue, exp)
waitForExpectations(timeout: 40, handler: nil)
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test function name "test_hybrid_ifconfigMe" should match the naming convention of other test functions. If the enum case is renamed to "ifconfigme" (all lowercase) for consistency, this test function name should be updated to "test_hybrid_ifconfigme" to match.

Copilot uses AI. Check for mistakes.
Comment on lines +116 to 119
func test_ipv6_ifconfigMe() {
let exp = expectation(description: "\(#function)\(#line)")
testPublicIP(PublicIPAPIURLs.IPv6.seeip.rawValue, exp)
testPublicIP(PublicIPAPIURLs.IPv6.ifconfigMe.rawValue, exp)
waitForExpectations(timeout: 40, handler: nil)
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test function name "test_ipv6_ifconfigMe" should match the naming convention of other test functions. If the enum case is renamed to "ifconfigme" (all lowercase) for consistency, this test function name should be updated to "test_ipv6_ifconfigme" to match.

Copilot uses AI. Check for mistakes.
("test_hybrid_seeip", test_hybrid_seeip),
("test_hybrid_whatismyipaddress", test_hybrid_whatismyipaddress),
("test_hybrid_ipify", test_hybrid_ipify),
("test_hybrid_ifconfigMe", test_hybrid_ifconfigMe),
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test entry string "test_hybrid_ifconfigMe" should match the naming convention of other test entries. If the enum case and test function are renamed to use all lowercase "ifconfigme", this entry should be updated to ("test_hybrid_ifconfigme", test_hybrid_ifconfigme) to match.

Suggested change
("test_hybrid_ifconfigMe", test_hybrid_ifconfigMe),
("test_hybrid_ifconfigme", test_hybrid_ifconfigMe),

Copilot uses AI. Check for mistakes.

("test_ipv4_ipify", test_ipv4_ipify),

("test_ipv4_ifconfigMe", test_ipv4_ifconfigMe),
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test entry string "test_ipv4_ifconfigMe" should match the naming convention of other test entries. If the enum case and test function are renamed to use all lowercase "ifconfigme", this entry should be updated to ("test_ipv4_ifconfigme", test_ipv4_ifconfigme) to match.

Copilot uses AI. Check for mistakes.

case ipify = "https://api.ipify.org"

case ifconfigMe = "https://ipv4.ifconfig.me/ip"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum case name "ifconfigMe" uses an inconsistent naming convention. The other enum cases in this file use all lowercase names (icanhazip, ipify, ident, amazonaws, ipinfo), but this one uses camelCase with a capital 'M'. For consistency with the rest of the codebase, consider renaming this to "ifconfigme" (all lowercase).

Copilot uses AI. Check for mistakes.
case ident = "https://v6.ident.me/"

case ipify = "https://api6.ipify.org"
case ifconfigMe = "https://ipv6.ifconfig.me/ip"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum case name "ifconfigMe" uses an inconsistent naming convention. The other enum cases in this file use all lowercase names (icanhazip, ipify, ident, amazonaws, ipinfo), but this one uses camelCase with a capital 'M'. For consistency with the rest of the codebase, consider renaming this to "ifconfigme" (all lowercase).

Copilot uses AI. Check for mistakes.
}

func test_ipv4_seeip() {
func test_ipv4_ifconfigMe() {
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test function name "test_ipv4_ifconfigMe" should match the naming convention of other test functions. If the enum case is renamed to "ifconfigme" (all lowercase) for consistency, this test function name should be updated to "test_ipv4_ifconfigme" to match.

Suggested change
func test_ipv4_ifconfigMe() {
func test_ipv4_ifconfigme() {

Copilot uses AI. Check for mistakes.

("test_ipv6_ipify", test_ipv6_ipify)
("test_ipv6_ipify", test_ipv6_ipify),
("test_ipv6_ifconfigMe", test_ipv6_ifconfigMe),
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test entry string "test_ipv6_ifconfigMe" should match the naming convention of other test entries. If the enum case and test function are renamed to use all lowercase "ifconfigme", this entry should be updated to ("test_ipv6_ifconfigme", test_ipv6_ifconfigme) to match.

Copilot uses AI. Check for mistakes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update public IP servers

3 participants