Fix Jellycuts Bridge local network permission and URL parsing - #29
Open
gscott82 wants to merge 1 commit into
Open
Fix Jellycuts Bridge local network permission and URL parsing#29gscott82 wants to merge 1 commit into
gscott82 wants to merge 1 commit into
Conversation
Member
|
@gscott82 Hi, your codex branch is not publicly available so it can't be reviewed. If you could make the code public I can review! |
ActuallyTaylor
requested changes
May 7, 2026
Comment on lines
+42
to
+61
| private static func bridgeWebSocketURL(from rawAddress: String?) -> URL? { | ||
| guard var address = rawAddress?.trimmingCharacters(in: .whitespacesAndNewlines), | ||
| !address.isEmpty else { | ||
| return nil | ||
| } | ||
|
|
||
| let lowerAddress = address.lowercased() | ||
| if lowerAddress.hasPrefix("http://") { | ||
| address = String(address.dropFirst("http://".count)) | ||
| } else if lowerAddress.hasPrefix("https://") { | ||
| address = String(address.dropFirst("https://".count)) | ||
| } | ||
|
|
||
| let normalizedAddress = address.lowercased() | ||
| if normalizedAddress.hasPrefix("ws://") || normalizedAddress.hasPrefix("wss://") { | ||
| return URL(string: address) | ||
| } | ||
|
|
||
| return URL(string: "ws://\(address)") | ||
| } |
Member
There was a problem hiding this comment.
This function should be moved into BridgeServer as it modifiers parts of the BridgeServer (URL).
Member
There was a problem hiding this comment.
Okay after re-looking at the code (its been a while), this code should actually be put into BridgeList view when the webserver entry is made into Core Data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes two Jellycuts Bridge connection issues seen on iOS when connecting to a local VS Code bridge on the same Wi-Fi network:
Problem observed
A Windows 11 + iPhone test setup could reach the bridge from Safari and from an independent WebSocket probe, but the Jellycuts app itself did not establish a usable bridge connection.
Observed behavior:
192.168.0.98:8080.ws://192.168.0.98:8080.BridgeViewalways prependedws://to the stored server string.Root cause
There appear to be two separate issues:
http://192.168.0.98:8080orws://192.168.0.98:8080can be transformed into invalid URLs such asws://http://....Validation
A local sideload test build with these two changes was installed on iPhone and verified against a VS Code/Jellycuts bridge running on Windows 11.
Results:
Jellycuts LANappeared in Settings > Privacy & Security > Local Network and could be enabled.192.168.0.98:8080connected successfully..jellycontent from the laptop to the iPhone worked.Notes
This PR intentionally does not change Pro/subscription behavior and does not add save-back/sync-to-editor behavior. It only addresses the local connection path for the existing Jellycuts Bridge feature.
I could not run a local Xcode build on Windows. The changes were validated through a GitHub Actions iOS build of the fork and sideload testing on the iPhone.