I tried to set tor proxy on ob2 but didn’t work for some reason.
here is how i do it…
service tor start.
add (socks5)127.0.0.1:9050 to the proxy db.
and check if it’s working.
https://api.ipify.org?format=json | ip
if I’m doing something wrong please tell me
Ruri
May 28, 2024, 6:03am
2
You need to add it as socks5, by default if you don’t specify it the proxy is added as http
of course, I did just forget to mention it.
Ruri
May 28, 2024, 6:10am
4
Which site did you check it against? Was the success key appropriate? Can you try it in the debugger and let me know the error it prints?
I tried it on all of them ifconfig.me , google, ipify.org …
here is the error.
[Executing block Http Request] ProxyException: RuriLib.Proxies.Exceptions.ProxyException: Failed to connect to proxy-server
---> System.Net.Sockets.SocketException (111): Connection refused
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Sockets.TcpClient.CompleteConnectAsync(ValueTask task)
at RuriLib.Proxies.ProxyClient.ConnectAsync(String destinationHost, Int32 destinationPort, TcpClient tcpClient, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at RuriLib.Proxies.ProxyClient.ConnectAsync(String destinationHost, Int32 destinationPort, TcpClient tcpClient, CancellationToken cancellationToken)
at RuriLib.Http.RLHttpClient.CreateConnection(HttpRequest request, CancellationToken cancellationToken)
at RuriLib.Http.RLHttpClient.SendAsync(HttpRequest request, Int32 redirects, CancellationToken cancellationToken)
at RuriLib.Functions.Http.RLHttpClientRequestHandler.HttpRequestStandard(BotData data, StandardHttpRequestOptions options)
at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.RunSubmissionsAsync(ScriptExecutionState executionState, ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.ScriptStateTaskExtensions.CastAsync[S,T](Task`1 task)
at RuriLib.Models.Debugger.ConfigDebugger.Run()
is it because I use it in a docker container ?.
Ruri
May 28, 2024, 4:59pm
7
Ah yes most likely! You cannot access ports of the host from a docker container. If you want you can set up a docker compose with a container that acts as a tor proxy and route the traffic through there. Otherwise you should see if it’s possible to share a network with the host using docker compose. I suggest you Google a bit and find the best option to solve this.