Bonjour @PascalHambourg
Voici le résultat de la commande :
root@debian:/home/debian# udevadm info /sys/class/net/eth* /sys/class/net/enx*
P: /devices/pci0000:00/0000:00:01.1/0000:02:00.0/usb2/2-1/2-1:1.0/net/eth0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:02:00.0/usb2/2-1/2-1:1.0/net/eth0
E: INTERFACE=eth0
E: IFINDEX=3
E: SUBSYSTEM=net
E: ID_RENAMING=1
P: /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.5/3-1.5:1.0/net/enx001e101f0000
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.5/3-1.5:1.0/net/enx001e101f0000
E: INTERFACE=enx001e101f0000
E: IFINDEX=4
E: SUBSYSTEM=net
E: USEC_INITIALIZED=3831030
E: ID_NET_NAMING_SCHEME=v247
E: ID_NET_NAME_MAC=enx001e101f0000
E: ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
E: ID_NET_NAME_PATH=enp0s29u1u5
E: ID_VENDOR=HUAWEI_MOBILE
E: ID_VENDOR_ENC=HUAWEI_MOBILE
E: ID_VENDOR_ID=12d1
E: ID_MODEL=HUAWEI_MOBILE
E: ID_MODEL_ENC=HUAWEI_MOBILE
E: ID_MODEL_ID=14db
E: ID_REVISION=0102
E: ID_SERIAL=HUAWEI_MOBILE_HUAWEI_MOBILE
E: ID_TYPE=generic
E: ID_BUS=usb
E: ID_USB_INTERFACES=:020600:0a0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=cdc_ether
E: ID_USB_CLASS_FROM_DATABASE=Communications
E: ID_VENDOR_FROM_DATABASE=Huawei Technologies Co., Ltd.
E: ID_MODEL_FROM_DATABASE=E353/E3131
E: ID_MM_HUAWEI_NDISDUP_SUPPORTED=1
E: ID_MM_CANDIDATE=1
E: ID_PATH=pci-0000:00:1d.0-usb-0:1.5:1.0
E: ID_PATH_TAG=pci-0000_00_1d_0-usb-0_1_5_1_0
E: ID_NET_DRIVER=cdc_ether
E: ID_NET_LINK_FILE=/usr/lib/systemd/network/73-usb-net-by-mac.link
E: ID_NET_NAME=enx001e101f0000
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enx001e101f0000
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
Effectivement en changeant la gateway j’ai bien accès a internet.
J’ai pu donc tester mon proxy :
root@debian:/home/debian/Bureau/DongleTest-master# node test.mjs
{ ip: '92.141.40.48' }
(Qui correspond bien a l’ip de ma box internet (j’ai changé quelques chiffres avant de poster le résultat))
Maintenant lorsque je veux tester ma première clé 4G (192.168.8.101) que j’ai configurer de la même manière dans SQUID que mon ip 192.168.5.62. J’obtiens une erreur 503 :
root@debian:/home/debian/Bureau/DongleTest-master# node test.mjs
Bad response: 503 RequestError: Bad response: 503
at ClientRequest.<anonymous> (file:///home/debian/Bureau/DongleTest-master/node_modules/got/dist/source/core/index.js:789:107)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:525:35)
at _destroy (node:_http_client:874:13)
at onSocketNT (node:_http_client:891:5)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
at ClientRequest.<anonymous> (/home/debian/Bureau/DongleTest-master/node_modules/hpagent/index.js:106:18)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at Socket.socketOnData (node:_http_client:574:11)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
input: undefined,
code: 'ERR_GOT_REQUEST_ERROR',
timings: {
start: 1673080723913,
socket: undefined,
lookup: undefined,
connect: undefined,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: 1673080903870,
abort: undefined,
phases: {
wait: undefined,
dns: undefined,
tcp: undefined,
tls: undefined,
request: undefined,
firstByte: undefined,
download: undefined,
total: 179957
}
},
options: {
request: undefined,
agent: {
http: undefined,
https: HttpsProxyAgent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: true,
maxSockets: 256,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
maxCachedSessions: 100,
_sessionCache: [Object],
proxy: [URL],
proxyRequestOptions: {},
[Symbol(kCapture)]: false
},
http2: undefined
},
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: {
'user-agent': 'got (https://github.com/sindresorhus/got)',
accept: 'application/json',
'accept-encoding': 'gzip, deflate, br'
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'GET',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: 'text',
url: URL {
href: 'https://api.ipify.org/?format=json',
origin: 'https://api.ipify.org',
protocol: 'https:',
username: '',
password: '',
host: 'api.ipify.org',
hostname: 'api.ipify.org',
port: '',
pathname: '/',
search: '?format=json',
searchParams: URLSearchParams { 'format' => 'json' },
hash: ''
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: true
}
}
Merci a toi