mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-10-06 15:11:38 +00:00
Fix proxy handling for local cli socket
This commit is contained in:
3 files changed
+14
-16
No files matched your search
@@ -46,6 +46,7 @@ public class BeaconClient {
|
||||
}
|
||||
|
||||
var client = HttpClient.newBuilder()
|
||||
.proxy(HttpClient.Builder.NO_PROXY)
|
||||
.followRedirects(HttpClient.Redirect.NORMAL)
|
||||
.build();
|
||||
HttpResponse<String> response;
|
||||
|
||||
@@ -2,12 +2,10 @@ package io.xpipe.app.beacon;
|
||||
|
||||
import io.xpipe.app.beacon.api.DaemonStopExchange;
|
||||
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.*;
|
||||
|
||||
public class BeaconServer {
|
||||
|
||||
@@ -15,7 +13,7 @@ public class BeaconServer {
|
||||
public static boolean isReachable(int port) {
|
||||
var local = Inet4Address.getByAddress(new byte[] {0x7f, 0x00, 0x00, 0x01});
|
||||
|
||||
try (var socket = new Socket()) {
|
||||
try (var socket = new Socket(Proxy.NO_PROXY)) {
|
||||
InetSocketAddress adress = new InetSocketAddress(local, port);
|
||||
socket.connect(adress, 5000);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in new issue
Block a user