Skip to content

MongoDB connector ignores SOCKS5 proxy settings #10529

Closed

Description

@39otrebla

Issue description

MongoDB connector ignores SOCKS5 proxy settings, both passed in url or in extra.

Expected Behavior

Passing proxyHost and proxyPort in the connection URL or inside the extra object should work.

Actual Behavior

Passing proxyHost and proxyPort in the connection URL or inside the extra object does not work (they both get ignored).

Steps to reproduce

Setup a SOCKS5 tunnel listening at localhost:27017, the try connecting by passing proxyHost and proxyPort either in the connection URL or inside the extra option.

My Environment

Dependency Version
Operating System Any
Node.js version >=16
Typescript version >=4
TypeORM version 0.3.17

Additional Context

I fixed it just by adding the following fields in the validOptionNames field:

  • proxyHost
  • proxyPort
  • proxyUsername
  • proxyPassword

These fields are documented (and I confirm they are working) in the currently supported version of the driver (5.2) as well as in the latest version of the driver (6.3), so this change should be safe enough as it will work when TypeORM will support version >6.

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

Activity

  1. github-actions commented on Sep 18, 2025

    @github-actions

    TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).

    As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.

    🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
    If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.

  2. Kumar-Kishan commented on Oct 20, 2025

    @Kumar-Kishan
    Contributor

    +1. If this is open. I can contribute for this?

  3. reopened this on Oct 20, 2025
  4. gioboa commented on Oct 20, 2025

    @gioboa
    Collaborator

    +1. If this is open. I can contribute for this?

    Yep, feel free to drop a PR. Thanks

  5. Kumar-Kishan commented on Oct 20, 2025

    @Kumar-Kishan
    Contributor

    @gioboa here is the pr for the same: #11731. Please review once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions