Skip to content

Commit

Permalink
Use the given IP if there is one. (#569)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced device identification process by allowing the device to
tunnel to a specified address during network scanning.

- **Bug Fixes**
- Improved handling of network requests and responses without altering
existing logic.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
floitsch authored Nov 8, 2024
1 parent 5b4d28a commit 61e770a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/jag/commands/device_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ func ScanNetwork(ctx context.Context, ds deviceSelect, port uint) ([]Device, err
} else if dev == nil {
return nil, fmt.Errorf("invalid identify response")
}
// Use the provided address. This way we can tunnel through the device.
dev.address = "http://" + addr
return []Device{*dev}, nil
}

Expand Down

0 comments on commit 61e770a

Please sign in to comment.