Skip to content

dannygpt/chatgpt-proxy-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatgpt-proxy-web

Flask reverse proxy ChatGPT website chat.openai.com/chat.

中文 | English

Prepare

You should log in to the ChatGPT website, find the cookie named _puid, and then copy its value.

This project heavily relies on the Plus-exclusive _puid parameter. Without it, CloudFlare cannot be bypassed.

Modify config.py to set the configuration.

# If you change this property, the `resource` directory needs to be manually deleted.
# Please configure a specific IP address for accessing the service, rather than using 0.0.0.0. If you are using a VPS, please configure the public IP address of the VPS's outbound traffic.
listen_addr = ("127.0.0.1", 8011)

# If using a domain name, need to configure `domain_url`, and `listen_addr` should be accessible from the public network. If it is an HTTPS service, need to configure nginx proxy_pass `listen_addr`.
# example1: domain_url = "http://chatgpt.chat:8011"; listen_addr = ("8.8.8.8", 8011)
# example2: domain_url = "http://chatgpt.chat"; listen_addr = ("8.8.8.8", 80)
# example3: domain_url = "https://chatgpt.chat"; listen_addr = ("127.0.0.1", 8011); nginx `location / {proxy_pass http://127.0.0.1:8011}`
domain_url = ""

# Enable account and password authentication for the webpage.
is_verify = False

# Proxy configuration, either HTTP or SOCKS5.
proxies = {"https": ""}

# Plus-exclusive cookie parameters. If you don't have them, ask a friend to share theirs.
puid = ""

'''
1. If using email login, only the `email_address` and `password` require.
2. If not email login, only the `session_token` require.
3. If not email login and also enable is_verify, the `user` needs to be rewritten.
   user = md5(('your_email' + 'your_password').encode()).hexdigest()
'''

password_list = [
    {"email_address": "", "password": "", "session_token": None, "user": None},
]

Install dependencies

pip install -r requirements.txt

Quick start

python3 main.py

browser open link: http://127.0.0.1:8011/chat

Note

  1. It can only be used for Plus member accounts, free accounts without _puid parameters will have CF verification.
  2. auto login auth.py, thank you https://github.com/acheong08/OpenAIAuth.

Renderings

login chat

About

Flask reverse proxy ChatGPT website chat.openai.com/chat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.4%
  • Python 46.6%