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 not working (OpenaiAccount/OpenaiChat Provider) (Docker image, Version: 0.3.9.7) #2507

Closed
The2Alert opened this issue Dec 25, 2024 · 10 comments
Assignees
Labels
bug Something isn't working stale

Comments

@The2Alert
Copy link

Screenshot

Screenshot 2024-12-25 132934

@The2Alert The2Alert added the bug Something isn't working label Dec 25, 2024
@The2Alert
Copy link
Author

The HAR file was created according to the instructions in the README.

@The2Alert
Copy link
Author

docker-compose.yml

version: '3.8'

services:
  g4f:
      image: hlohaus789/g4f:0.3.9.7
      ports:
        - 127.0.0.1:8080:8080
        - 127.0.0.1:1337:1337
        - 127.0.0.1:7900:7900
      shm_size: '2g'
      volumes:
        - ./har_and_cookies:/app/har_and_cookies
      environment:
        G4F_PROXY: socks5://<SECRET>:<SECRET>@<SECRET>:<SECRET>
      restart: always

@The2Alert
Copy link
Author

@xtekky @hlohaus

@The2Alert
Copy link
Author

The idea is to completely dispense with the HAR file and log in directly to Chromium via Proxy and implement the browser to start when you launch g4f for authorization.

@hlohaus
Copy link
Collaborator

hlohaus commented Dec 28, 2024

@The2Alert The Chrome Browser doesn't support socks proxies.

Copy link

github-actions bot commented Jan 5, 2025

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added the stale label Jan 5, 2025
@OldDamnSchool
Copy link

OldDamnSchool commented Jan 11, 2025

Scenario:
Platform: Windows 10
(g4f installed in anaconda python=3.11 environment.)
With the environment enabled run "set G4F_PROXY=http://host:port" then run "python -m g4f.cli gui --port 8080 --debug" or "python -m g4f.cli api --debug".
Problem:
Neither of the two options starts with the Proxy set, it is simply ignored.
Tested with sock4 and 5 too.

@hlohaus
Copy link
Collaborator

hlohaus commented Jan 11, 2025

@OldDamnSchool I found this for your special case:
https://stackoverflow.com/questions/31598963/how-to-set-specific-environment-variables-when-activating-conda-environment

@OldDamnSchool
Copy link

Thanks @hlohaus <3

@github-actions github-actions bot removed the stale label Jan 12, 2025
Copy link

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants