tayoji-io / socks_proxy Goto Github PK
View Code? Open in Web Editor NEWdart package,http/socks4/socks5 proxy
License: MIT License
dart package,http/socks4/socks5 proxy
License: MIT License
SocksProxy.initProxy(proxy: 'SOCKS5 185.105.89.38:27022');
await HttpClient()
.getUrl(Uri.parse(
'https://raw.githubusercontent.com/tayoji-io/socks_proxy/master/README.md'))
.then((value) {
return value.close();
})
.then((value) {
return value.transform(utf8.decoder);
})
.then((value) {
return value.fold(
'', (dynamic previous, element) => previous + element);
})
.then((value) => print(value))
.catchError((e) => print(e));
I do not know if it is correct but it works
The import statement used in the docs is incorrect.
It needs to be:
import 'package:flutter_socks_proxy/socks_proxy.dart';
socks_proxy/lib/http_parser.dart
Lines 487 to 489 in 7a1a6fe
From RFC1929, [VER] used in initial negotiation for authentication is 0x01 rather than 0x05, which leads to failure when autheticate with server.
Besides, when autheticate failed due to wrong username or password, an error occurs as #1.
Hi, the type SameSite is missing in the package. I'm getting Error: Type 'SameSite' not found
.
Can't find how to make requests with headers.
For example, with regular HTTP request we can use
Future<Album> fetchAlbum() async {
final response = await http.get(
Uri.parse('https://jsonplaceholder.typicode.com/albums/1'),
// Send authorization headers to the backend.
headers: {
HttpHeaders.authorizationHeader: 'Basic your_api_token_here',
},
);
How we can do the same with the proxy?
when i set socks4/5 external proxy like 192.111.139.165:4145
SocksProxy.initProxy(
proxy: 'SOCKS5 192.111.139.165:4145',
onCreate: (client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
},
then i cant access http aips and get this error
Unhandled Exception: Connection reset by peer
by setting internal proxy like 127.0.0.1:2081, i get different error
Unhandled Exception: Connection closed before full header was received
it woks fine with https apis and i don't have this problem with http PROXY IP:PORT
proxies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.