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

[Feature] Create redirect proxy type to overwrite the current server proxy #1243

Open
2 tasks done
lexavey opened this issue May 3, 2024 · 2 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@lexavey
Copy link

lexavey commented May 3, 2024

Verify steps

Description

I live in some planet which depends on cloudflare IP, they only give me access to specific IP, the IP is not persistent, always change some time.

As example today is ip 1.2.3.4 next 30 day is 2.3.4.5 or 5.6.7.8

In order to use vmess or trojan I must change IP by edit proxy provider file.

Not only me but 10k+ people in my planet maybe have same problem.

I'm already use proxy type http, unfortunatelly only available CONNECT method by default.

What I want to request is create a new proxy type redirect, the main function is replace server and port, or maybe sni.

proxies:
  # redirect
  - name: "SERVER1"
    type: redirect
    server: 1.2.3.4
    port: 443
    # tls: true # https
    # skip-cert-verify: true
    # sni: custom.com
  - name: "SS1"
    type: ss
    server: unusedserverbecause_will_overwrite by dialer
    port: unused_port_because_will_overwrite by dialer
    dialer-proxy: SERVER1

something like that.
how I can achieve ?

i want build my self but im really zero golang.
maybe someone give me clue how to do it ( create myself proxies type then build it ) i will do it with copilot.

Possible Solution

No response

@lexavey lexavey added the enhancement New feature or request label May 3, 2024
@c83a
Copy link

c83a commented May 29, 2024

Have you ever looked at 'tunnel' ?
https://wiki.metacubex.one/en/config/tunnels/
Sounds like work for u?

@lexavey
Copy link
Author

lexavey commented May 29, 2024

Have you ever looked at 'tunnel' ? https://wiki.metacubex.one/en/config/tunnels/ Sounds like work for u?

It seems just make a forwarding with proxy to new localhost port.

From facebook group discussion I discovered this.

server:
 - &address1 myserver.com
 - &address2 1.2.3.4
 
ws: &ws
    port: 443
    type: trojan
    password: premium
    network: ws
    skip-cert-verify: true
    udp: true
    sni: nasa.gov
    ws-opts:
      path: /trojan
      headers:
        Host: nasa.gov
proxies:
#formatws
  - name: *address1 
    server: *address1 
    <<: *ws
  - name: *address2
    server: *address2
    <<: *ws

Maybe this is what I want, I need read more from this doc https://wiki.metacubex.one/en/config/syntax/#references

That file will provide one proxy group, I need help for working like this.

Proxy Groups [ GATEWAY ] : [ 1.1.1.1 ] [ 2.2.2.2 ] [ 3.3.3.3 ]
Proxy Groups [ PROXY ] : [ myserver-a.com ] [ myserver-b.com ] [ myserver-c.com ]

When select [ 2.2.2.2 ] in [ GATEWAY ], all connection in the [ PROXY ] ( I mean overide server ) should use from gateway.

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

No branches or pull requests

2 participants