sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: frp
Issue: [Feature Request] Make client IP accessible to upstream by spoofing source IP
Labels: proposal

### Describe the feature request

As a reverse proxy, FRP currently supports two ways for the upstream server to obtain the client's real IP: HTTP X-Forwarded-For and Proxy Protocol. The former only supports HTTP protocol and the latter supports generic TCP connection but would require support for uptream. My current solution for upstreams that do not support proxy protocol is to use [mmproxy](https://github.com/cloudflare/mmproxy) or [go-mmproxy](https://github.com/path-network/go-mmproxy) to wrap the bare TCP with the proxy protocol. However, this requires configuring additional programs and upstream ports and also introduces overhead to copy data between the processes.

### Describe alternatives you've considered

The underlying technology that mmproxy uses is [TPROXY](https://www.kernel.org/doc/Documentation/networking/tproxy.txt) supported by the Linux kernel. This can be easily implemented in Go by a few lines of code (I referred to [go-mmproxy](https://github.com/path-network/go-mmproxy))

```go
dialer := net.Dialer{LocalAddr: saddr}
dialer.Control = func(network, address string, c syscall.RawConn) error {
    return c.Control(func(fd uintptr) {
        syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP, syscall.IP_TRANSPARENT, 1)
    })
}
```

`saddr` is the remote client address obtained from the FRP server. Then the upstream will be connected as if it is directly connected from the IP address of the remote client.

By doing so, the FRP client would support spoofing the client IP to the upstream out-of-box, without further configuration to the upstream or running additional programs.

However, this functionality still has certain limitations: first, this would only work on the Linux system as far as I know; second, [configurations](https://github.com/path-network/go-mmproxy/tree/master?tab=readme-ov-file#routing-setup) to the Linux firewall/routing is still needed (these configurations are global and do not need to be set separately for each service); third, `CAP_NET_ADMIN` capability is required to set `IP_TRANSPARENT` socket opt.

I have a simple [PoC](https://github.com/dong-zeyu/frp/tree/tproxy) for this feature in my fork, but maybe more work is needed to make it into the FRP.

### Affected area

- [ ] Docs
- [ ] Installation
- [X] Performance and Scalability
- [ ] Security
- [ ] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others
Repository: node
Issue: Allow bailing early when test fails
Labels: feature request,test_runner

Needs a *Bail Out*/*Fail Fast* strategy

### What is the problem this feature will solve?

Not having to sift through a jumbled up mess of stack traces as I'm cleaning up tests after significant refactoring of the unit i'm testing.

Spit out the failing test and it's stack trace, then Exit 1 as *soon* as a test fails

### Proposal

A bail flag, i.e `--bail` that hints to the runner that a failure should report and exit.

### Alternatives 

Cooking up an [Abort Signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) wiring but that's really me writing machinery code to test.. the code... which is just bad taste, at least in most cases.
Repository: go
Issue: proposal: time: allow scientific notation in ParseDuration
Labels: Proposal

### Proposal Details

# Issue

I encountered this issue while parsing the output of an application I was working with:

* [`strconv.ParseFloat`](https://pkg.go.dev/strconv#ParseFloat) accepts numbers expressed in scientific notation. `strconv.ParseFloat("3.336e-6", 64)`, for example, works as expected.
* [`time.ParseDuration`](https://pkg.go.dev/time#ParseDuration) does not accept numbers expressed in scientific notation.  `time.ParseDuration("3.336e-6s")`, for example, fails with `unknown unit "e-" in duration "3.336e-6s"`.

A Go Playground demonstration of this limitation in `time.ParseDuration` can be found here: https://go.dev/play/p/G-1FveHxpZ3

# Proposal

I propose that `time.ParseDuration` be enhanced to allow durations expressed using scientific notation.
Repository: stable-diffusion-webui
Issue: [Bug]: --share not work with paperspace
Labels: upstream,gradio

### Checklist

- [X] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [X] The issue has been reported before but has not been fixed yet

### What happened?

--share does not produce the correct link

### Steps to reproduce the problem

Start WebUI

### What should have happened?

Correct output link

### What browsers do you use to access the UI ?

Google Chrome

### Sysinfo

!python3.10 launch.py --share --xformers --enable-insecure-extension-access --gradio-queue --no-half-vae --opt-channelslast --theme dark

### Console logs

```Shell
Running on local URL:  http://127.0.0.1:7860

Could not create share link. Missing file: /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2. 

Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps: 

1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
2. Rename the downloaded file to: frpc_linux_amd64_v0.2
3. Move the file to this location: /usr/local/lib/python3.10/dist-packages/gradio
Startup time: 8.3s (prepare environment: 1.5s, import torch: 2.4s, import gradio: 0.8s, setup paths: 1.2s, initialize shared: 0.1s, other imports: 0.6s, load scripts: 0.5s, create ui: 0.4s, gradio launch: 0.7s).
Applying attention optimization: xformers... done.
Model loaded in 6.3s (create model: 1.2s, apply weights to model: 3.8s, calculate empty prompt: 0.9s).
```


### Additional information

I cannot find "/usr/local/lib/python3.10/dist-packages/gradio"　How to fix it?
Repository: vscode
Issue: Go to line in relative to current cursor
Labels: feature-request,quick-open

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Hi, dear developers, I would like to ask for the feature that enables using the `go to line` functionality in relative to the current cursor position.

Currently, we may use Ctrl + G (in Windows) to open a prompt choosing which line we want to jump to, and I noticed that it is supported even with a negative index (similar to indexing in Python).

Can we add the feature to jump relative to the current cursor? It would be acceptable (at least for me), to type something like `:c+10` or `:c-30`, to trigger the relative mode. Or even in a more complicated case, if we have multiple cursors in use, typing `:c+10` refers to the first, `:C+10` refers to the last.

IMHO this would be a really helpful tool when I am navigating some long logs output by my program, when debugging where had been wrong, say, I knew I had a vector of length 1234 printed out in verbose debug mode and I tried to jump above 1234 lines like we use `1234k` in Vim. (but I don't want Vim keybinds except for this feature).

Thank you for any help and advice!
Repository: ollama
Issue: Ollama下载太慢 (downloads from github slow in china)
Labels: networking

Ollamasetup.exe的下载速度太慢了。要将近20个小时，有没有什么办法
Repository: godot
Issue: It is possible to add the same event several times to the same input action
Labels: bug,topic:editor,topic:input

### Tested versions

v4.3.dev.custom_build [11d376813]

### System information

linux

### Issue description

in `Project > Project Settings > Input Map`:


![Screenshot from 2024-04-27 08-33-03](https://github.com/godotengine/godot/assets/71937306/db6e3ab6-7450-4d35-8e40-a8aea8ea840a)

you can add the same key/button several times to the same action.


### Steps to reproduce

- add the same event twice to the same action

### Minimal reproduction project (MRP)

any
Repository: godot
Issue: The editor window gets pushed on top whenever it imports something
Labels: enhancement,topic:editor,topic:import

### Tested versions

v4.3.dev.custom_build [11d376813]

### System information

linux

### Issue description

When a resource is added to the project files, it gets loaded instantly regardless of editor focus.
However, the editor puts itself on top of other windows when doing so, hiding other windows that had the focus.

In practice, this can happen when adding files via the OS filesystem (such as when pasting an image that was copied) or when exporting a file from some software directly inside of `res://`.

For example, when editing and saving a csv file, godot will re-steal the focus every time you save, which is *extremely* annoying.


### Steps to reproduce

- open any project
- navigate to its files using the OS' filesystem and add a picture in there
- the godot editor should raise above the other windows and grab the focus

### Minimal reproduction project (MRP)

any
Repository: pytorch
Issue: Further explanation for `batch_isend_irecv`
Labels: oncall: distributed,triaged

### 📚 The doc issue

[here](https://github.com/pytorch/pytorch/blob/ce503c1b40207dab770c28cbd4568cd9e105277b/torch/distributed/distributed_c10d.py#L2067) the doc string says the function will return `dist.Work` by calling corresponding ops, however the returned reqs might not be "corresponding" (e.g. `batch_isend_irect([op1, op2])` might return only one `[coalescing_req]`), which is quite confusing. (Or can we have a 1-to-1 mapping for p2p_op_list and returned reqs?
```
Args:
    p2p_op_list: A list of point-to-point operations(type of each operator is
        ``torch.distributed.P2POp``). The order of the isend/irecv in the list
        matters and it needs to match with corresponding isend/irecv on the
        remote end.

Returns:
    A list of distributed request objects returned by calling the corresponding
    op in the op_list.
```

### Suggest a potential alternative/fix

_No response_

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k
Repository: vscode
Issue: SCM - actions on highlighted files
Labels: feature-request,accessibility,scm

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
I have defined a keyboard shortcut for the "Discard Changes" action on the Source Control view.
This action(and similar) is working only on the selected file and not on the highlighted file.
Meaning, if I use the arrows keys to navigate between files, and then discard the file changes on the current highlighted file I cannot do it directly.
I have to first select the file, which opens the file in the editors view, and then delete it.
If I want to discard multiple files, I lose the focus to the editors view(when I select a file), so I need to bring the focus back to the source control view to and select another file, which is pretty annoying.

I would like the option to do actions and use these keyboard shortcuts on the highlighted file and not on the selected one, so for example after discard one file, I can easily go to the next file and discard it too.

On the contrary, on the explorer view, actions are being done on the highlighted file and not on the selected file. I understand it was a mindful decision to do a different behavior on the Source Control view, but I would be happy if there was an option to customize it.
Repository: bitcoin
Issue: depends: Freetype and xcbproto version in depends are too new
Labels: GUI,Build system

While investigating interface versions for [qtsowrap](https://github.com/laanwj/qtsowrap/blob/main/scripts/collector.py), i noticed that currently, in depends, the version of freetype and xproto are too new. As of 8cd9475321737a69454f3b54a588b7bfe9f32847.

At least if we're considering Ubuntu 20.04LTS as the reference. xcb-proto is even too new for 22.04LTS:

| library | 20.04LTS | 22.04LTS | depends |
|-------|--------|---------|---------|
| libfontconfig    |   2.13.1     |   2.13.1 |    2.12.6  | 
| libfreetype     |     2.10.1    |    2.11.1|  2.11.0 ⚠️    |
| libxkbcommon  |       0.10.0 |       1.4.0|  0.8.4    |
| libxcb            |   1.14     |     1.14|   1.14   |
| libxcb-util       |   0.4.0   |      0.4.0|    0.4.0  |
| libxcb-image    |     0.4.0   |      0.4.0|  0.4.0    |
| libxcb-keysyms |      0.4.0  |       0.4.0|   0.4.0   |
| libxcb-render-util |  0.3.9   |      0.3.9|    0.3.9  |
| libxcb-icccm (=libxcb-util-wm)    |    0.4.1  |       0.4.1|     0.4.1  |
| xcb-proto   |   1.14  |      1.14 |     1.15.2  ⚠️|

- libfreetype was upgraded from 2.7.1 to 2.11.0 in 01544dd78ccc0b0474571da854e27adef97137fb (#23489)
- xcb-proto was upgraded from 1.14 to 1.15.2 in 7cb88c8b46723d306b96953a6a60c90a4ab211e3 (#28097), apparently for a build issue

As these dependencies are used to link against existing system libraries, this means there are potential issues at runtime (though most should be caught by symbols not being found, and this hasn't been reported, so it's likely not too bad).

Edit: example of an issue caused by this: https://github.com/bitcoin/bitcoin/pull/29923#issuecomment-2068994077
Repository: next.js
Issue:  Screen flickers when setting cookies (server side) 
Labels: bug

### Link to the code that reproduces this issue

https://github.com/HenrikZabel/nextjs-flicker

### To Reproduce

1. Start the application in development (npm run dev)
2. Click on the button "Update cookies"
3. The text/page will flicker

### Current vs. Expected behavior

How described above the screen flickers when the cookies update.

The screen should normally not flicker when updating the cookies.

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
Binaries:
  Node: 21.5.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

_No response_
Repository: go
Issue: x/tools/gopls: set non-zero exit code on `check` command when there are errors
Labels: NeedsDecision,FeatureRequest,gopls,Tools

### Proposal Details

`gopls check` is useful to lint code, but it currently always sets exit code 0 which is not ideal when one wants to run it for example on a CI:

```console
$ gopls check internal/cmd/check.go; echo $?
main.go:10:24: unused parameter: file
0
```

I suggest to either always set exit code to non-zero when there are errors, or introduce a new `--exit-code` option to do the same.
Repository: flutter
Issue: VideoPlayerController's isInitialized state is turning to false, when network is gone for a while.
Labels: platform-android,p: video_player,package,has reproducible steps,P2,team-android,triaged-android,found in release: 3.19,found in release: 3.22

I'm using VideoPlayer plugin and there are issues with network. For example, I initialize the video in initState, video starts to play, VideoPlayerController  buffers 1-3 minutes of the video. I turn off the network(wifi or mobile data). Video plays until the buffered position(3 minutes). If I do not turn on the network  while that time, VideoPlayerController's isInitialized state turns false. After that, video will not continue even if the network is back.



Steps to reproduce:

1) Declare VideoPlayerController as variable, initialize in initState method.
2) Use VideoPlayer widget inside the body, give the videoPlayerController to the widget.
3) Turn off the network for a while,(until the videoPlayerController gets reset).
4) Turn on the network, video will not continue to play.
Repository: flutter
Issue: [go_router] canPop() throws "BadState: No element" on error pages (and maybe other pages)
Labels: package,has reproducible steps,P2,p: go_router,team-go_router,triaged-go_router,found in release: 3.19,found in release: 3.22

### Steps to reproduce

1. Implement  ```errorBuilder``` for GoRouter with some CustomErrorPage() widget.
2. Check if you can pop the page inside the ```CustomErrorPage()``` by accessing ```GoRouter.of(context).canPop()``` inside the ```build(..)``` function of your ```CustomErrorPage```
3. Navigate to any URL that does not exist (which should bring up the error page on an empty route match list)

### Expected results

Expecting ```GoRouter.of(context).canPop()``` to return false if there is not even a single page to pop.

### Actual results

Accessing ```canPop()``` will crash with ```Bad state: No element``` .

One may also trigger this error in other ways, that is just the way I discovered it. I wanted to use my default Header on my error page, which internally checks if it should display a back button, resulting in this error. I guess this is a pretty common use case.

The Problem seems to be, that GoRouter.canPop delegates it to routerDelegate.canPop() which then tries to get the "last" match by accessing ```currentConfiguration.matches.last```. This throws as there are no matches. The implementation of ```Navigator.canPop()``` returns false if there is no route, so i guess it should be changed to  ```currentConfiguration.matches.lastOrNull``` and return false if no route was found. But whatever value it may return from your point of view, throwing (by accident, i'd say) seems really wrong.


### Code sample

<details open><summary>Initialize GoRouter</summary>

```dart
// MaterialApp.router(...
GoRouter(
  // ... your config
   errorBuilder: (context, state) => CustomErrorPage(
        routerState: state,
   ),
)

/// a custom error page
class CustomErrorPage extends StatelessWidget {
  final GoRouterState routerState;

  const GoErrorPage({
    super.key,
    required this.routerState,
  });

  @override
  Widget build(BuildContext context) {
    final canPop = GoRouter.of(context).canPop(); // <-- this will crash
    // show a back button if one can pop ...
    return Text("Hello there");
  }
}
```

</details>


### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.19045.4291], locale en-GB)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.32)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.88.0)
[√] Connected device (4 available)
[√] Network resources

• No issues found!
```

</details>
Repository: godot
Issue: Clicking "Save & Quit" for unsaved script pops up the confirmation dialog again
Labels: bug,topic:editor

### Tested versions

4.2.2.stable & master[6118592c6d88350d01f74faff6fd49754f84a7d0]

### System information

Arch Linux

### Issue description

When exiting the editor, clicking "Save & Quit" for unsaved script brings the prompt dialog back again instead of saving the script.

https://github.com/godotengine/godot/assets/372476/669bf1a5-ae87-4674-a28a-a31e005c17c9

### Steps to reproduce

1. Prepare an unsaved script.
    1. Create a new script.
    2. Remove the script in the FileSystem dock.
    3. Use Inspector's history button to bring the script back in memory.
2. Close the editor.
3. Click "Save & Quit".

### Minimal reproduction project (MRP)

N/A
Repository: stable-diffusion-webui
Issue: [GET THE OLD SAMPLING METHOD BACK]: 
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Genrate decent images 

### Proposed workflow

1. Go to .... a1111
2. Press .... sampling method - OLD WAY
3. ... genrate beautiful images as workflow we have set up 


### Additional information

we request the old samplig metod back
Repository: awesome-mac
Issue: 🎉 Add Battery Toolkit 
Labels: addition

### 🪩 Provide a link to the proposed addition

https://github.com/mhaeuser/Battery-Toolkit

### 😳 Explain why it should be added

Battery Toolkit is an alternative to AlDente.

### 📖 Additional context

_No response_

### 🧨 Issue Checklist

- [ ] I have checked for other similar issues
- [ ] I have explained why this change is important
- [ ] I have added necessary documentation (if appropriate)
Repository: go
Issue: cmd/cgo/internal/testplugin: TestIssue18676 failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "cmd/cgo/internal/testplugin" && test == "TestIssue18676"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8749578204495837505)):

    === RUN   TestIssue18676
    ( GOPATH=$TMPDIR PWD=$TMPDIR/src/testplugin LD_LIBRARY_PATH=$TMPDIR/src/testplugin /Users/swarming/.swarming/w/ir/x/w/goroot/bin/go build -gcflags '' -buildmode=plugin -o plugin.so ./issue18676/plugin.go )
        plugin_test.go:239: /Users/swarming/.swarming/w/ir/x/w/goroot/bin/go build -gcflags  -buildmode=plugin -o plugin.so ./issue18676/plugin.go: exit status 1
            command-line-arguments: /Users/swarming/.swarming/w/ir/x/w/goroot/pkg/tool/darwin_amd64/cgo: exit status 2
    --- FAIL: TestIssue18676 (3.67s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: build: build failure on x_pkgsite-gotip-darwin-amd64_11
Labels: NeedsInvestigation

```
#!watchflakes
default <- builder == "x_pkgsite-gotip-darwin-amd64_11" && repo == "pkgsite" && mode == "build"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8749571725741454817)):

    Building Go cmd/dist using /Users/swarming/.swarming/w/ir/cache/tools/go_bootstrap. (go1.20.6 darwin/amd64)
    runtime: /Users/swarming/.swarming/w/ir/cache/tools/go_bootstrap/pkg/tool/darwin_amd64/asm: signal: killed


— [watchflakes](https://go.dev/wiki/Watchflakes)