tauri-apps / plugins-workspace

All of the official Tauri plugins in one place!
https://tauri.app
Apache License 2.0
987 stars 277 forks source link

socks5 proxy is not supported in @tauri-apps/plugin-http #1992

Open hooraygith opened 4 weeks ago

hooraygith commented 4 weeks ago

This is work:

import { fetch } from '@tauri-apps/plugin-http';

const response = await fetch('http://google.com', {
    method: 'GET',
    proxy: {
        all: 'http://127.0.0.1:1095'
    }
});
console.log(response.status);

this is not work:

import { fetch } from '@tauri-apps/plugin-http';

const response = await fetch('http://google.com', {
    method: 'GET',
    proxy: {
        all: 'socks5://127.0.0.1:1097'
    }
});
console.log(response.status);

Got error in network panel (ipc://localhost/plugin:http|fetch):

"builder error"

hooraygith commented 3 weeks ago

socks5 is supported by reqwest

reqwest::Proxy::http("socks5://localhost:1080")?