I use the libgit2sharp-ssh
and i implement the ssh connection successfully but now the https/http
connection is not working under proxy ?
i look at the implementation of the methods clone and Push in libgit2sharp-ssh
lib and both of them the value of ProxyOptions
is:
ProxyOptions = new GitProxyOptions { Version = 1 }
public virtual void Push(Remote remote, IEnumerable<string> pushRefSpecs, PushOptions pushOptions)
{
Ensure.ArgumentNotNull(remote, "remote");
Ensure.ArgumentNotNull(pushRefSpecs, "pushRefSpecs");
// Return early if there is nothing to push.
if (!pushRefSpecs.Any())
{
return;
}
if (pushOptions == null)
{
pushOptions = new PushOptions();
}
// Load the remote.
using (RemoteHandle remoteHandle = Proxy.git_remote_lookup(repository.Handle, remote.Name, true))
{
var callbacks = new RemoteCallbacks(pushOptions);
GitRemoteCallbacks gitCallbacks = callbacks.GenerateCallbacks();
Proxy.git_remote_push(remoteHandle,
pushRefSpecs,
new GitPushOptions()
{
PackbuilderDegreeOfParallelism = pushOptions.PackbuilderDegreeOfParallelism,
RemoteCallbacks = gitCallbacks,
ProxyOptions = new GitProxyOptions { Version = 1 },
});
}
}
internal enum GitProxyType
{
None,
Auto,
Specified
}
[StructLayout(LayoutKind.Sequential)]
internal struct GitProxyOptions
{
public uint Version;
public GitProxyType Type;
public IntPtr Url;
public IntPtr CredentialsCb;
public IntPtr CertificateCheck;
public IntPtr CbPayload;
}
}
is libgit2sharp-ssh
not support working with proxy when using the http/s
connection to git ?? (because working with libgit2sharp without the implementation of the ssh work with proxy well )