Gitea cannot authenticate user

I,m using gitea on my server with https, and trying to run drone on local.

here is my docker-compose file:

version: "2"
    image: drone/drone:0.8
     - 80:8000
     - 9000
      - ./drone:/var/lib/drone/
    restart: always
      - DRONE_HOST=http://localhost
      - DRONE_GITEA=true
      - DRONE_OPEN=false
      - DRONE_SECRET=secret
    image: drone/agent:0.8
    command: agent
    restart: always
    depends_on: [ drone-server ]
      - /var/run/docker.sock:/var/run/docker.sock
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET=secret

the drone-server stars without any error. the http://localhost shows a form requiring my version control system username and password. when I enter my gitea user & pass, it gives The system failed to process your Login request. error.

drone’s log:
level=error msg="cannot authenticate user. Post tls: oversized record received with length 20291"

if I change gitea domain to HTTP logs shows the following error:
level=error msg="cannot authenticate user. 403 Forbidden"

i’ve trying with different users, but same error.

But It works when I send the create token request manually with the body {"name": "drone"}. returns the token.

i tried with github too. it gives the tls error or timeout error. :frowning:

I solved the problem. it was my fault actually.
I’m using docker behind proxy. because docker has banned Iran.
that way all requests were passing through proxy.
after removing docker proxy and using os VPN the problem solved.

but don’t know how to do it without proxy!
thanks anyway

fixed. I think it was something related to my local docker. cause after using my prod server. that didn’t happen. thanks