You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "zsmlinux (via GitHub)" <gi...@apache.org> on 2024/02/29 06:33:17 UTC

[I] feat: Support to set the upstream host dynamically [apisix]

zsmlinux opened a new issue, #10981:
URL: https://github.com/apache/apisix/issues/10981

   ### Description
   
   Such as:
   ![image](https://github.com/apache/apisix/assets/10682145/ec39c24f-fa8c-4284-9073-341a760790fe)
   
   * protocol support `ws` `wss`
   * for this example, $1 $2 is ip,$3 is port, host can set to $1:$3 , that host can be set dynamically
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1989853519

   > Has this feat been confirmed?
   
   What do u think about this issue? @monkeyDluffy6017 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1972382754

   It doesn't matter, beacuse we can limit admin API access by IP addresses.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "br41n10 (via GitHub)" <gi...@apache.org>.
br41n10 commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-2050978083

   @zsmlinux I have the same problem, and I write a custom plugin to achieve this.
   
   checkout my gits: https://gist.github.com/br41n10/e2d378c7a04d4861b2f0cbf4d2476d71
   
   This is a very basic implementation, modify on your needs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1972456661

   Here is the same issue https://github.com/apache/apisix/issues/9544


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1970525094

   Host can be set dynamically based on the uri for pattern matching, that is a common usage in nginx.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1999750968

   closing as duplicate of #9544


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-2065649532

   > @zsmlinux I have the same problem, and I write a custom plugin to achieve this.
   > 
   > checkout my gits: https://gist.github.com/br41n10/e2d378c7a04d4861b2f0cbf4d2476d71
   > 
   > This is a very basic implementation, modify on your needs.
   
   I had write a custom plugin too. 
   https://github.com/zsmlinux/apisix-custom-plugins/blob/main/proxy-rewrite-dynamic-upstream.lua


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1972341477

   If designed this way, wouldn't there be risks? For example, someone could potentially call the Apisix admin API by using path"/127.0.0.1/127.0.0.1/9180/apisix/admin/routers" like the default ADMIN_API_KEY, allowing them to operate routers to cause damage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1972382116

   > So, u want something that dynamically forwards requests upstream based on the path, for example, if ur request path is "/172.17.0.1/127.0.0.1/9999/real_path", u want Apisix to be designed in a way that it can forward the request to "172.17.0.1:9999"? Did I understand correctly?
   
   Exactly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1972388613

   > It doesn't matter, beacuse we can limit admin API access by IP addresses.
   
   Yes, I know it's possible. However, other users that use this feature might also need to impose restrictions or perform additional operations. Perhaps we should consider other people's thoughts on this. I can handle this issue, but I remain skeptical.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1970519020

   > could you please elaborate more? Please add a screenshot in english so others can help as well.
   Such as:
   ```
     "plugins": {
       "proxy-rewrite": {
         "host": "$1:$3",
         "regex_uri": [
           "^/(\\d+\\.\\d+\\.\\d+\\.\\d+)/(\\d+\\.\\d+\\.\\d+\\.\\d+)/(\\d+)/(.*)",
           "/$4"
         ],
         "scheme": "wss"
       }
     },
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1970517812

   could you please elaborate more? Please add a screenshot in english so others can help as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1970574759

   Same interest in this issue https://github.com/apache/apisix/issues/9544


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "theweakgod (via GitHub)" <gi...@apache.org>.
theweakgod commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1972329659

   So, u want something that dynamically forwards requests upstream based on the path, for example, if ur request path is "/172.17.0.1/127.0.0.1/9999/real_path", u want Apisix to be designed in a way that it can forward the request to "172.17.0.1:9999"? Did I understand correctly?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "zsmlinux (via GitHub)" <gi...@apache.org>.
zsmlinux commented on issue #10981:
URL: https://github.com/apache/apisix/issues/10981#issuecomment-1988263380

   > > It doesn't matter, beacuse we can limit admin API access by IP addresses.
   > 
   > Yes, I know it's possible. However, other users that use this feature might also need to impose restrictions or perform additional operations. Perhaps we should consider other people's thoughts on this. I can handle this issue, but I remain skeptical.
   
   Has this feat been confirmed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] feat: Support to set the upstream host dynamically [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek closed issue #10981: feat: Support to set the upstream host dynamically
URL: https://github.com/apache/apisix/issues/10981


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org