
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
trpc.group/trpc-go/trpc-gateway/plugin/devenv
Advanced tools
To address the issue of multiple environments, this plugin can be configured to specify the target environment for forwarding based on the "request-domain" request header.
The plugin maintains a list of environment configurations, supporting all fields in the tRPC client, such as namespace, env_name, set_name, etc. The "disable_servicerouter" field is set to true.
import (
_ "trpc.group/trpc-go/trpc-gateway/plugin/devenv"
)
Note: Make sure to register it under server.service.filter, not server.filter.
global: # Global configuration
server: # Server configuration
filter: # Interceptor list for all service handlers
service: # Business services provided, can have multiple
- name: trpc.inews.trpc.gateway # Service routing name
filter:
- devenv # Gateway plugin registered under service.filter, so that it can be dynamically loaded in router.yaml
plugins: # Plugin configuration
log: # Log configuration
gateway: # Plugin type is gateway
devenv: # Devenv plugin
env_key: request-domain # Request parameter name that identifies the environment, default is request-domain
Plugins at different levels will only be executed once, with the priority order: router plugin > service plugin > global plugin
router: # Router configuration
- method: /v1/user/info
id: "xxxxxx"
target_service:
- service: trpc.user.service
plugins:
- name: devenv # Router-level plugin
props:
env_list:
- request_domain: grey.epc.webdev.com # Environment identifier
disable: false # Whether to disable this environment
namespace: Production
env_name: formal # Environment name, same as env_name in trpc client
target: "polaris://xxxx" # Target service, same as target in trpc client
set_name: "" # Set name, same as set_name in trpc client
client: # Upstream service configuration, follows the trpc protocol
- name: trpc.user.service
plugins:
- name: devenv # Service-level configuration
props:
- request_domain: grey.epc.webdev.com
disable: false # Whether to disable this environment
env_name: formal
namespace: Production
set_name: ""
target: ""
plugins:
- name: devenv # Global configuration
props:
- request_domain: grey.epc.webdev.com
disable: false # Whether to disable this environment
env_name: formal
namespace: Production
set_name: ""
target: ""

FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.