Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy option #41

Closed
killo3967 opened this issue Apr 26, 2023 · 5 comments
Closed

Proxy option #41

killo3967 opened this issue Apr 26, 2023 · 5 comments

Comments

@killo3967
Copy link

Hi

Could you add a proxy option?

@missuo
Copy link
Member

missuo commented Apr 26, 2023

I will consider adding this feature if needed. @killo3967

@killo3967
Copy link
Author

Ok, so let me explain my idea.
So far from Calibre (https://calibre-ebook.com/) using the translation plugin (https://github.com/bookfere/Ebook-Translator-Calibre-Plugin) and with the right configuration I can use your software.

{
"name": "DeepL X",
"languages": {
"source": {
"English (British)": "EN-GB"
},
"target": {
"Español de España": "ES
}
},
"request": {
"url": "http://127.0.0.1:1188/translate",
"method": "POST",
"headers": {
"content-Type": "application/json".
},
"data": {
"source_lang":"",
"target_lang":"",
"text":""
}
},
"response": "response['data']"
}

The problem I have is the one I told you in the previous post. After several requests it gives an error. #40 (#40)

That's why I want to pass your program through the tor network so that each request comes from a different source and with this I think I could bypass the DeepL protections. I have tried with ADVOR ( https://sourceforge.net/projects/advtor/) to capture the program but I get this error message.

DeepL X has been successfully launched! Listening on 0.0.0.0.0:1188
Made by sjlleo and missuo.
2023/04/26 18:44:41 main.go:203: Post "https://www2.deepl.com/jsonrpc": dial tcp 255.16.0.0.0:443: connectex: A socket operation was attempted on an unreachable network.
[GIN] 2023/04/26 - 18:44:41 |←[97;42m 200 ←[0m| 69.7096ms | 192.168.1.50 |←[97;46m POST ←[0m "/translate"
2023/04/26 18:44:41 main.go:203: Post "https://www2.deepl.com/jsonrpc": dial tcp 255.16.0.0.0:443: connectex: A socket operation was attempted on an unreachable network.
[GIN] 2023/04/26 - 18:44:41 |←[97;42m 200 ←[0m| 1.9329ms | 192.168.1.50 |←[97;46m POST ←[0m "/translate"
2023/04/26 18:44:58 main.go:203: Post "https://www2.deepl.com/jsonrpc": dial tcp 255.16.0.0.0:443: connectex: A socket operation was attempted on an unreachable network.
[GIN] 2023/04/26 - 18:44:58 |←[97;42m 200 ←[0m| 1.905ms | 192.168.1.50 |←[97;46m POST ←[0m "/translate"

This is why this is the proxy request. Calibre sends it to your software that via proxy forwards it to the tor router (ADVOR).

@missuo
Copy link
Member

missuo commented Apr 26, 2023

I've rewritten a package for Python that you can call directly from within the Python code. You can check this link for details.

@killo3967
Copy link
Author

Sorry , but i don't understand what are you doing and my skills in pyhton are less than zero. What i need is that your api could have a proxy option.

@missuo missuo closed this as completed May 13, 2023
@hoonlight
Copy link

hoonlight commented May 15, 2023

Sorry , but i don't understand what are you doing and my skills in pyhton are less than zero. What i need is that your api could have a proxy option.

OwO-Network/PyDeepLX@e56a61a

This is a PR to add proxy option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants