Comments (3)
Forgot to mention... The issue I'm having is, I have a VM running locally on 192.168.64.2
and is using bridge mode for internet connection. After I connected Brook GUI (macOS), I can no longer access the VM via IP
from brook.
There is a built-in module: Bypass Geo
, it contains ZZ
. All private IPs are ZZ
. BTW, using m.ipaddress is also possible, but the definition of address(m.ipaddress or m.domainaddress) includes both the host and port. For example, 1.1.1.1:443, or google.com:443.
Sorry for the lack of clarity in the documentation, I think I should improve it.
Test:
- A macOS intel (192.168.3.177)
- Install Brook GUI on macOS
- Install VMware Fusion on macOS
- Install Ubuntu(192.168.3.160) on VMware Fusion with bridge network
- Brook GUI: Enable Bypass Geo module, and Connect
- Ubuntu: start a simple http server
nami install httpserver
,httpserver -l :8080
- macOS: connect to the http server:
curl -I http://192.168.3.160:8080
, success.
I have no tested it on M1 Mac, because I have not installed VMware Fusion on my m1 mac, I believe the result should be the same?
Brook GUI
In Brook GUI, scripts are abstracted into modules, and it will automatically combine _header.tengo
and _footer.tengo
, so you only need to write the module itself.
modules = append(modules, {
// If you want to predefine multiple brook links, and then programmatically specify which one to connect to, then define `brooklinks` key a function
brooklinks: func(m) {
// Please refer to the example in `brooklinks.tengo`
},
// If you want to intercept and handle a DNS query, then define `dnsquery` key a function, `m` is the `in_dnsquery`
dnsquery: func(m) {
// Please refer to the example in `block_aaaa.tengo`
},
// If you want to intercept and handle an address, then define `address` key a function, `m` is the `in_address`
address: func(m) {
// Please refer to the example in `block_google_secure_dns.tengo`
},
// If you want to intercept and handle a http request, then define `httprequest` key a function, `request` is the `in_httprequest`
httprequest: func(request) {
// Please refer to the example in `ios_app_downgrade.tengo` or `redirect_google_cn.tengo`
},
// If you want to intercept and handle a http response, then define `httpresponse` key a function, `request` is the `in_httprequest`, `response` is the `in_httpresponse`
httpresponse: func(request, response) {
// Please refer to the example in `response_sample.tengo`
}
})
In your case, for example:
modules = append(modules, {
address: func(m) {
if m.ipaddress {
text := import("text")
if text.has_prefix(m.ipaddress, "192.168.64.2") { // because m.ipaddress contains port, such as 192.168.64.2:80
return { bypass: true }
}
}
}
})
tun2brook
If you are using tun2brook, you can combine multiple modules into a complete script in the following way. For example:
cat _header.tengo > my.tengo
cat block_google_secure_dns.tengo >> my.tengo
cat block_aaaa.tengo >> my.tengo
cat _footer.tengo >> my.tengo
from brook.
Yay! Thank you for the quick response, it works now. I think the tengo script above is working, it was just the network configuration I had was "Shared" but not "Bridge". Tysm!
from brook.
Related Issues (20)
- Connection issue in China. HOT 4
- 关于新版移除 proxy 模式后 SwitchyOmega 无法使用的问题 HOT 2
- lastest version cannot run on win7 and this is the error code.google said Go 1.21 no longer support win7 HOT 2
- ipv6 only brook server erro HOT 2
- quicserver: INTERNAL_ERROR (remote): acme/ autocert: missing server name HOT 1
- GUI: 编辑器编辑较大 module 时微卡 HOT 1
- can't load videos on WeChat when Brook is connected lol HOT 9
- not work on windows 11 HOT 3
- Cannot get local link ipv6 from tun HOT 2
- How to configure on android app? HOT 5
- Operation not permitted when try to raise UDP Receive Buffer Size HOT 1
- windows 11 client cannot connect to tun 15
- Brook Troubleshooting Steps
- Brook 问题排查步骤
- relays是不支持了吗? HOT 2
- testsocks5 udp测试总是请求到127 HOT 2
- openWrt install Brook.arm64.ipk email login fail HOT 2
- Brook GUI for Linux: Can't open websites within the app HOT 1
- Device or app installation identifier along side with token for userAPI HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brook.