Skip to content

Http2Adapter怎么配置findProxy #905

Description

@imwcl

New Issue Checklist

  • I have searched for a similar issue in the project and found none

Issue Info

Info Value
Platform Name e.g. flutter / ios / android
Platform Version e.g. v1.12.13+hotfix.9 / 13.0 / 9.0
Dio Version e.g. 3.0.10 / 3.0.10
Android Studio / Xcode Version e.g. Android Studio 3.3.2 / Xcode 11.6
Repro rate e.g. all the time (100%) / sometimes x% / only once
Repro with our demo prj e.g. does it happen with our demo project?
Demo project link e.g. link to a demo project that highlights the issue

Issue Description and Steps

Http2Adapter怎么配置findProxy,我使用之后,通过charles无法抓包

if (api.httpProtocol == TDFHttpProtocol.http1) {
final adapter = DefaultHttpClientAdapter();
adapter.onHttpClientCreate = (client) {
if (findProxy != null) {
client.findProxy = (uri) {
return "PROXY " + findProxy;
};
}
};
_dio.httpClientAdapter = adapter;
} else {
final adapter = Http2Adapter(
ConnectionManager(
idleTimeout: 15000,
onClientCreate: (uri, client) {
client.onBadCertificate = (cer) {
return true;
};
},
),
);
_dio.httpClientAdapter = adapter;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions